@adelin-io/cli 0.0.0-stage → 0.1.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/README.md +76 -2
- package/authoring-release.json +174 -0
- package/package.json +30 -4
- package/runtime-integrity.json +9 -0
- package/scripts/adelin.mjs +7768 -0
- package/scripts/assemble-checkout.mjs +93 -0
- package/scripts/local-save.mjs +513 -0
- package/scripts/materialize.mjs +319 -0
- package/scripts/runtime.mjs +8950 -0
- package/scripts/typecheck.mjs +72 -0
- package/scripts/workspace-state.mjs +183 -0
- package/skill/README.md +77 -0
- package/skill/SKILL.md +100 -0
- package/skill/authoring/access.md +193 -0
- package/skill/authoring/analytics.md +20 -0
- package/skill/authoring/app-memory.md +128 -0
- package/skill/authoring/app-requirements.md +99 -0
- package/skill/authoring/app-structure.md +265 -0
- package/skill/authoring/assets.md +117 -0
- package/skill/authoring/auth.md +261 -0
- package/skill/authoring/content-binding.md +26 -0
- package/skill/authoring/i18n.md +184 -0
- package/skill/authoring/language.md +503 -0
- package/skill/authoring/local-workflow.md +1665 -0
- package/skill/authoring/offline/connectivity.md +50 -0
- package/skill/authoring/offline/example.md +102 -0
- package/skill/authoring/offline/history-sync.md +39 -0
- package/skill/authoring/offline/index.md +29 -0
- package/skill/authoring/offline/package-storage.md +37 -0
- package/skill/authoring/offline/platforms.md +35 -0
- package/skill/authoring/offline/startup-navigation.md +53 -0
- package/skill/authoring/platform-files.md +616 -0
- package/skill/authoring/player/casting.md +47 -0
- package/skill/authoring/player/controls.md +95 -0
- package/skill/authoring/player/downloads.md +90 -0
- package/skill/authoring/player/drm.md +31 -0
- package/skill/authoring/player/index.md +39 -0
- package/skill/authoring/player/live-dvr.md +33 -0
- package/skill/authoring/player/platforms.md +47 -0
- package/skill/authoring/player/playback.md +42 -0
- package/skill/authoring/player/tracks-subtitles.md +32 -0
- package/skill/authoring/profiles.md +213 -0
- package/skill/authoring/remote-keys.md +139 -0
- package/skill/authoring/search.md +27 -0
- package/skill/authoring/store.md +85 -0
- package/skill/authoring/tv-text-entry.md +146 -0
- package/skill/design/approved/README.md +14 -0
- package/skill/design/approved/vesper-phone-home.jpg +0 -0
- package/skill/design/approved/vesper-tv-detail.jpg +0 -0
- package/skill/design/approved/vesper-tv-home.jpg +0 -0
- package/skill/design/design-guide.md +610 -0
- package/skill/design/edge-to-edge.md +66 -0
- package/skill/design/icons.md +50 -0
- package/skill/design/responsive-layout.md +175 -0
- package/skill/design/safe-area.md +221 -0
- package/skill/design/streaming-playbook.md +131 -0
- package/skill/design/visual-review.md +150 -0
- package/skill/examples/README.md +24 -0
- package/skill/examples/cinema/DESIGN.md +58 -0
- package/skill/examples/cinema/app.tsx +17 -0
- package/skill/examples/cinema/assets/logo.png +0 -0
- package/skill/examples/cinema/components/Action.tsx +40 -0
- package/skill/examples/cinema/components/Action.tv.tsx +44 -0
- package/skill/examples/cinema/components/CatalogGrid.tsx +31 -0
- package/skill/examples/cinema/components/ContinueRail.tsx +98 -0
- package/skill/examples/cinema/components/Feedback.tsx +28 -0
- package/skill/examples/cinema/components/Field.tsx +41 -0
- package/skill/examples/cinema/components/LibraryRail.tsx +46 -0
- package/skill/examples/cinema/components/PlayAction.tsx +29 -0
- package/skill/examples/cinema/components/Root.tsx +59 -0
- package/skill/examples/cinema/components/Shell.tsx +70 -0
- package/skill/examples/cinema/components/Tab.tsx +22 -0
- package/skill/examples/cinema/components/TitleCard.tsx +68 -0
- package/skill/examples/cinema/components/TitleMeta.tsx +36 -0
- package/skill/examples/cinema/locales/en.ts +211 -0
- package/skill/examples/cinema/locales/lt.ts +211 -0
- package/skill/examples/cinema/preview/phone-home.jpg +0 -0
- package/skill/examples/cinema/preview/tv-detail.jpg +0 -0
- package/skill/examples/cinema/preview/tv-home.jpg +0 -0
- package/skill/examples/cinema/screens/portrait/Account.tsx +110 -0
- package/skill/examples/cinema/screens/portrait/Browse.tsx +73 -0
- package/skill/examples/cinema/screens/portrait/Detail.tsx +159 -0
- package/skill/examples/cinema/screens/portrait/Home.tsx +196 -0
- package/skill/examples/cinema/screens/portrait/Player.tsx +299 -0
- package/skill/examples/cinema/screens/portrait/Search.tsx +46 -0
- package/skill/examples/cinema/screens/portrait/Search.tv.tsx +55 -0
- package/skill/examples/cinema/screens/portrait/SignIn.tsx +101 -0
- package/skill/examples/cinema/screens/portrait/SignUp.tsx +106 -0
- package/skill/examples/cinema/store.tsx +132 -0
- package/skill/examples/cinema/theme.ts +32 -0
- package/skill/examples/documentary/DESIGN.md +33 -0
- package/skill/examples/documentary/app.tsx +17 -0
- package/skill/examples/documentary/components/Action.tsx +43 -0
- package/skill/examples/documentary/components/CatalogGrid.tsx +47 -0
- package/skill/examples/documentary/components/Feedback.tsx +27 -0
- package/skill/examples/documentary/components/Field.tsx +33 -0
- package/skill/examples/documentary/components/LibraryRail.tsx +47 -0
- package/skill/examples/documentary/components/Root.tsx +62 -0
- package/skill/examples/documentary/components/Shell.tsx +93 -0
- package/skill/examples/documentary/components/StoryCard.tsx +53 -0
- package/skill/examples/documentary/components/StoryMeta.tsx +22 -0
- package/skill/examples/documentary/preview/phone-home.jpg +0 -0
- package/skill/examples/documentary/preview/tv-detail.jpg +0 -0
- package/skill/examples/documentary/preview/tv-home.jpg +0 -0
- package/skill/examples/documentary/screens/portrait/Account.tsx +97 -0
- package/skill/examples/documentary/screens/portrait/Browse.tsx +71 -0
- package/skill/examples/documentary/screens/portrait/Detail.tsx +133 -0
- package/skill/examples/documentary/screens/portrait/Home.tsx +89 -0
- package/skill/examples/documentary/screens/portrait/Player.tsx +116 -0
- package/skill/examples/documentary/screens/portrait/Search.tsx +48 -0
- package/skill/examples/documentary/screens/portrait/SignIn.tsx +96 -0
- package/skill/examples/documentary/screens/portrait/SignUp.tsx +101 -0
- package/skill/examples/documentary/store.tsx +115 -0
- package/skill/examples/documentary/theme.ts +20 -0
- package/skill/examples/series/DESIGN.md +55 -0
- package/skill/examples/series/app.tsx +17 -0
- package/skill/examples/series/components/Action.tsx +42 -0
- package/skill/examples/series/components/CatalogGrid.tsx +43 -0
- package/skill/examples/series/components/ContinueRail.tsx +78 -0
- package/skill/examples/series/components/Feedback.tsx +26 -0
- package/skill/examples/series/components/Field.tsx +34 -0
- package/skill/examples/series/components/LibraryRail.tsx +38 -0
- package/skill/examples/series/components/OutcomeNote.tsx +28 -0
- package/skill/examples/series/components/PlayAction.tsx +29 -0
- package/skill/examples/series/components/RestoreAction.tsx +33 -0
- package/skill/examples/series/components/Root.tsx +75 -0
- package/skill/examples/series/components/SaveTitle.tsx +34 -0
- package/skill/examples/series/components/Shell.tsx +75 -0
- package/skill/examples/series/components/TitleCard.tsx +62 -0
- package/skill/examples/series/components/UnlockAction.tsx +10 -0
- package/skill/examples/series/preview/phone-home.jpg +0 -0
- package/skill/examples/series/preview/tv-detail.jpg +0 -0
- package/skill/examples/series/preview/tv-home.jpg +0 -0
- package/skill/examples/series/screens/portrait/Account.tsx +125 -0
- package/skill/examples/series/screens/portrait/Browse.tsx +61 -0
- package/skill/examples/series/screens/portrait/Detail.tsx +231 -0
- package/skill/examples/series/screens/portrait/Home.tsx +109 -0
- package/skill/examples/series/screens/portrait/MyList.tsx +44 -0
- package/skill/examples/series/screens/portrait/Plans.tsx +131 -0
- package/skill/examples/series/screens/portrait/Player.tsx +138 -0
- package/skill/examples/series/screens/portrait/Profiles.tsx +103 -0
- package/skill/examples/series/screens/portrait/Search.tsx +50 -0
- package/skill/examples/series/screens/portrait/SignIn.tsx +94 -0
- package/skill/examples/series/screens/portrait/SignUp.tsx +100 -0
- package/skill/examples/series/store.tsx +192 -0
- package/skill/examples/series/theme.ts +32 -0
- package/skill/guides/final-pricing-capabilities.md +13 -0
- package/skill/reference/api.md +842 -0
- package/skill/reference/components.md +1782 -0
- package/skill/reference/packages.md +24 -0
- package/skill/scripts/assemble-checkout.mjs +93 -0
- package/skill/scripts/local-save.mjs +513 -0
- package/skill/scripts/materialize.mjs +319 -0
- package/skill/scripts/workspace-state.mjs +183 -0
- package/types/adelin-access.d.ts +70 -0
- package/types/adelin-analytics.d.ts +5 -0
- package/types/adelin-assets.d.ts +26 -0
- package/types/adelin-auth.d.ts +37 -0
- package/types/adelin-content.d.ts +112 -0
- package/types/adelin-device.d.ts +195 -0
- package/types/adelin-downloads.d.ts +47 -0
- package/types/adelin-env.d.ts +8 -0
- package/types/adelin-globals.d.ts +19 -0
- package/types/adelin-i18n.d.ts +31 -0
- package/types/adelin-native-stack.d.ts +178 -0
- package/types/adelin-navigation.d.ts +264 -0
- package/types/adelin-profiles.d.ts +51 -0
- package/types/adelin-react.d.ts +49 -0
- package/types/adelin-reanimated.d.ts +376 -0
- package/types/adelin-storage.d.ts +9 -0
- package/types/adelin-store.d.ts +74 -0
- package/types/adelin-ui.d.ts +1518 -0
- package/types/adelin-utils.d.ts +7 -0
- package/types/adelin-worklets.d.ts +15 -0
- package/workspace-tsconfig.json +53 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
adelin: {
|
|
3
|
+
auth: {
|
|
4
|
+
AUTH_INVALID_CREDENTIALS: "Neteisingas el. pašto adresas arba slaptažodis.",
|
|
5
|
+
AUTH_ACCOUNT_EXISTS: "Paskyra su šiuo el. pašto adresu jau yra. Verčiau prisijunkite.",
|
|
6
|
+
AUTH_EMAIL_UNVERIFIED: "Pirmiausia patvirtinkite el. pašto adresą. Gautuosiuose ieškokite mūsų atsiųstos nuorodos.",
|
|
7
|
+
AUTH_EMAIL_DELIVERY_UNAVAILABLE: "Šiuo metu nepavyko išsiųsti laiško. Bandykite vėliau.",
|
|
8
|
+
AUTH_RATE_LIMITED: "Per daug bandymų. Šiek tiek palaukite ir bandykite dar kartą.",
|
|
9
|
+
AUTH_ACCOUNT_UNAVAILABLE: "Šios paskyros šiuo metu naudoti negalima.",
|
|
10
|
+
AUTH_REAUTH_REQUIRED: "Saugumo sumetimais prisijunkite iš naujo, kad tęstumėte.",
|
|
11
|
+
AUTH_LINK_CONFLICT: "Šis prisijungimo būdas jau susietas su kita paskyra.",
|
|
12
|
+
AUTH_EMAIL_INVALID: "Įveskite tinkamą el. pašto adresą.",
|
|
13
|
+
AUTH_PASSWORD_REQUIRED: "Įveskite slaptažodį.",
|
|
14
|
+
AUTH_PASSWORD_TOO_SHORT: "Slaptažodį sudarykite bent iš 8 simbolių.",
|
|
15
|
+
AUTH_PASSWORDS_DIFFER: "Slaptažodžiai nesutampa.",
|
|
16
|
+
AUTH_UNAVAILABLE: "Šiuo metu prisijungti negalima. Bandykite vėliau.",
|
|
17
|
+
AUTH_OPERATION_FAILED: "Kažkas nepavyko. Patikrinkite ryšį ir bandykite dar kartą.",
|
|
18
|
+
},
|
|
19
|
+
keyboard: {
|
|
20
|
+
space: "Tarpas",
|
|
21
|
+
delete: "Trinti",
|
|
22
|
+
clear: "Išvalyti",
|
|
23
|
+
done: "Atlikta",
|
|
24
|
+
clearAll: "Išvalyti visą tekstą",
|
|
25
|
+
capitals: "Didžiosios raidės",
|
|
26
|
+
letters: "Raidės",
|
|
27
|
+
symbols: "Simboliai",
|
|
28
|
+
speak: "Rašyti balsu",
|
|
29
|
+
stopListening: "Nebeklausyti",
|
|
30
|
+
atSign: "eta",
|
|
31
|
+
dot: "taškas",
|
|
32
|
+
dash: "brūkšnelis",
|
|
33
|
+
underscore: "apatinis brūkšnys",
|
|
34
|
+
dotCom: "taškas com",
|
|
35
|
+
},
|
|
36
|
+
carousel: {
|
|
37
|
+
slide: "{{index}} skaidrė iš {{count}}",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
common: {
|
|
41
|
+
brand: "Vesper",
|
|
42
|
+
tagline: "Filmai ir serialai sutemus.",
|
|
43
|
+
loading: "Įkeliama",
|
|
44
|
+
checkConnection: "Patikrinkite ryšį ir bandykite dar kartą.",
|
|
45
|
+
checkingSignIn: "Tikriname, ar esate prisijungę.",
|
|
46
|
+
back: "Atgal",
|
|
47
|
+
signIn: "Prisijungti",
|
|
48
|
+
createAccount: "Sukurti paskyrą",
|
|
49
|
+
continueBrowsing: "Naršyti toliau",
|
|
50
|
+
email: "El. paštas",
|
|
51
|
+
password: "Slaptažodis",
|
|
52
|
+
part: "dalis",
|
|
53
|
+
onePart: "{{count}} dalis",
|
|
54
|
+
parts: "Dalių: {{count}}",
|
|
55
|
+
minutes: "{{minutes}} min.",
|
|
56
|
+
},
|
|
57
|
+
library: {
|
|
58
|
+
loading: "Ruošiame biblioteką.",
|
|
59
|
+
failed: "Nepavyko įkelti bibliotekos",
|
|
60
|
+
},
|
|
61
|
+
home: {
|
|
62
|
+
emptyTitle: "Kol kas nėra ką žiūrėti",
|
|
63
|
+
emptyMessage: "Filmai ir serialai atsiras čia, kai tik bus pridėti.",
|
|
64
|
+
details: "Išsamiau",
|
|
65
|
+
},
|
|
66
|
+
browse: {
|
|
67
|
+
title: "Naršyti",
|
|
68
|
+
oneTitle: "{{count}} kūrinys",
|
|
69
|
+
titles: "Kūrinių: {{count}}",
|
|
70
|
+
all: "Visi",
|
|
71
|
+
allGenres: "Visi žanrai",
|
|
72
|
+
emptyTitle: "Čia kol kas nieko nėra",
|
|
73
|
+
emptyMessage: "Pasirinkite kitą žanrą.",
|
|
74
|
+
},
|
|
75
|
+
search: {
|
|
76
|
+
title: "Paieška",
|
|
77
|
+
placeholder: "Ieškokite filmo, serialo ar serijos",
|
|
78
|
+
tvPlaceholder: "Filmas, serialas ar serija",
|
|
79
|
+
oneResult: "{{count}} rezultatas",
|
|
80
|
+
results: "Rezultatų: {{count}}",
|
|
81
|
+
allTitles: "Visi kūriniai",
|
|
82
|
+
loading: "Paieška tuoj bus paruošta.",
|
|
83
|
+
failed: "Nepavyko įkelti paieškos",
|
|
84
|
+
noMatch: "Nieko nerasta pagal „{{query}}“",
|
|
85
|
+
noMatchMessage: "Pabandykite trumpesnį žodį ar pavadinimo dalį.",
|
|
86
|
+
},
|
|
87
|
+
account: {
|
|
88
|
+
title: "Paskyra",
|
|
89
|
+
whoIsWatching: "Kas žiūri",
|
|
90
|
+
watchingNow: "Dabar žiūri",
|
|
91
|
+
pickUp: "Tęskite nuo ten, kur {{name}} sustojo",
|
|
92
|
+
thisDevice: "Šis įrenginys",
|
|
93
|
+
confirmSignOut: "Atsijungti nuo Vesper šiame įrenginyje?",
|
|
94
|
+
signedIn: "Šiame įrenginyje esate prisijungę prie Vesper.",
|
|
95
|
+
signInPrompt: "Prisijunkite su Vesper paskyra ir žiūrėkite arba susikurkite naują.",
|
|
96
|
+
cancel: "Atšaukti",
|
|
97
|
+
signOut: "Atsijungti",
|
|
98
|
+
signingOut: "Atsijungiama…",
|
|
99
|
+
},
|
|
100
|
+
detail: {
|
|
101
|
+
loading: "Ruošiame šį kūrinį.",
|
|
102
|
+
failed: "Nepavyko įkelti šio kūrinio",
|
|
103
|
+
goneTitle: "Šis kūrinys nebepasiekiamas",
|
|
104
|
+
goneMessage: "Grįžkite į biblioteką ir raskite kitą kūrinį.",
|
|
105
|
+
episodeContext: "{{show}} · {{season}} sezono {{episode}} serija",
|
|
106
|
+
about: "Apie",
|
|
107
|
+
season: "{{number}} sezonas",
|
|
108
|
+
episodes: "Serijos",
|
|
109
|
+
upNext: "Toliau",
|
|
110
|
+
moreFrom: "Daugiau iš „{{title}}“",
|
|
111
|
+
moreLikeThis: "Panašūs kūriniai",
|
|
112
|
+
noEpisodes: "Serijų kol kas nėra",
|
|
113
|
+
noEpisodesMessage: "Serijos atsiras čia, kai tik bus pridėtos.",
|
|
114
|
+
noSynopsis: "Daugiau informacijos apie šį kūrinį atsiras, kai ji bus pridėta.",
|
|
115
|
+
watched: "Peržiūrėta",
|
|
116
|
+
markWatched: "Pažymėti kaip peržiūrėtą",
|
|
117
|
+
noPlayback: "Šio kūrinio kol kas negalima žiūrėti.",
|
|
118
|
+
episodesLater: "Serijas galėsite žiūrėti čia, kai tik jos bus pridėtos.",
|
|
119
|
+
},
|
|
120
|
+
player: {
|
|
121
|
+
unavailable: "Peržiūra negalima",
|
|
122
|
+
unavailableMessage: "Grįžkite prie kūrinio ir pasirinkite ką nors kita.",
|
|
123
|
+
backToTitle: "Atgal prie kūrinio",
|
|
124
|
+
showControls: "Rodyti valdiklius",
|
|
125
|
+
hideControls: "Slėpti valdiklius",
|
|
126
|
+
notLoaded: "Nepavyko įkelti vaizdo įrašo",
|
|
127
|
+
position: "Pozicija {{elapsed}} iš {{duration}}",
|
|
128
|
+
drag: "Vilkite į norimą vietą",
|
|
129
|
+
play: "Leisti",
|
|
130
|
+
pause: "Pristabdyti",
|
|
131
|
+
back10: "Atgal 10 sekundžių",
|
|
132
|
+
forward10: "Pirmyn 10 sekundžių",
|
|
133
|
+
restart: "Žiūrėti nuo pradžių",
|
|
134
|
+
settings: "Peržiūros nustatymai",
|
|
135
|
+
closeSettings: "Uždaryti nustatymus",
|
|
136
|
+
settingsTitle: "Peržiūra",
|
|
137
|
+
picture: "Vaizdas",
|
|
138
|
+
fit: "Talpinti",
|
|
139
|
+
fill: "Užpildyti",
|
|
140
|
+
stretch: "Ištempti",
|
|
141
|
+
subtitles: "Subtitrai",
|
|
142
|
+
off: "Išjungta",
|
|
143
|
+
audio: "Garsas",
|
|
144
|
+
speed: "Greitis",
|
|
145
|
+
normal: "Įprastas",
|
|
146
|
+
textSize: "Teksto dydis",
|
|
147
|
+
small: "Mažas",
|
|
148
|
+
medium: "Vidutinis",
|
|
149
|
+
large: "Didelis",
|
|
150
|
+
textStyle: "Teksto stilius",
|
|
151
|
+
shadow: "Šešėlis",
|
|
152
|
+
outline: "Kontūras",
|
|
153
|
+
box: "Fonas",
|
|
154
|
+
textColour: "Teksto spalva",
|
|
155
|
+
white: "Balta",
|
|
156
|
+
yellow: "Geltona",
|
|
157
|
+
},
|
|
158
|
+
signIn: {
|
|
159
|
+
description: "Prisijunkite su Vesper paskyra ir žiūrėkite toliau.",
|
|
160
|
+
verifyNotice: "Patikrinkite el. paštą, patvirtinkite paskyrą ir prisijunkite.",
|
|
161
|
+
signingIn: "Jungiamasi…",
|
|
162
|
+
newHere: "Dar neturite Vesper paskyros?",
|
|
163
|
+
},
|
|
164
|
+
signUp: {
|
|
165
|
+
title: "Susikurkite paskyrą",
|
|
166
|
+
description: "Viena paskyra visiems ekranams, kuriuose žiūrite.",
|
|
167
|
+
registered: "Patikrinkite el. paštą ir patvirtinkite paskyrą. Patvirtinę grįžkite prisijungti.",
|
|
168
|
+
returnToSignIn: "Grįžti prie prisijungimo",
|
|
169
|
+
confirmPassword: "Pakartokite slaptažodį",
|
|
170
|
+
create: "Sukurti paskyrą",
|
|
171
|
+
creating: "Kuriama paskyra…",
|
|
172
|
+
signInInstead: "Prisijungti esama paskyra",
|
|
173
|
+
},
|
|
174
|
+
shell: {
|
|
175
|
+
tabs: {
|
|
176
|
+
home: "Pradžia",
|
|
177
|
+
browse: "Naršyti",
|
|
178
|
+
search: "Paieška",
|
|
179
|
+
account: "Paskyra",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
feedback: {
|
|
183
|
+
retry: "Bandyti dar kartą",
|
|
184
|
+
},
|
|
185
|
+
playAction: {
|
|
186
|
+
play: "Žiūrėti",
|
|
187
|
+
resume: "Tęsti",
|
|
188
|
+
playEpisode: "Žiūrėti {{number}} seriją",
|
|
189
|
+
resumeEpisode: "Tęsti {{number}} seriją",
|
|
190
|
+
playSeasonEpisode: "Žiūrėti {{season}} sez. · {{episode}} ser.",
|
|
191
|
+
resumeSeasonEpisode: "Tęsti {{season}} sez. · {{episode}} ser.",
|
|
192
|
+
},
|
|
193
|
+
continueRail: {
|
|
194
|
+
title: "Žiūrėkite toliau",
|
|
195
|
+
seasonEpisode: "{{season}} sez. · {{episode}} ser.",
|
|
196
|
+
episode: "{{number}} serija",
|
|
197
|
+
next: "Toliau: {{place}}",
|
|
198
|
+
start: "Pradėti",
|
|
199
|
+
minutesLeft: "Liko {{minutes}} min.",
|
|
200
|
+
},
|
|
201
|
+
titleCard: {
|
|
202
|
+
watched: "Peržiūrėta",
|
|
203
|
+
},
|
|
204
|
+
titleMeta: {
|
|
205
|
+
hours: "{{hours}} val.",
|
|
206
|
+
hoursMinutes: "{{hours}} val. {{minutes}} min.",
|
|
207
|
+
uhd: "4K",
|
|
208
|
+
hd: "HD",
|
|
209
|
+
hdr: "HDR",
|
|
210
|
+
},
|
|
211
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { useEffect, useState } from '@adelin/react';
|
|
2
|
+
import { useAuth } from '@adelin/auth';
|
|
3
|
+
import { useNavigation } from '@adelin/navigation';
|
|
4
|
+
import { useTranslation } from '@adelin/i18n';
|
|
5
|
+
import { useDispatch, useSelector } from '@adelin/store';
|
|
6
|
+
import { FocusGroup, Image, Pressable, ScrollView, StyleSheet, Text, View, theme, useWindowDimensions, Screen } from '@adelin/ui';
|
|
7
|
+
import { Platform } from '@adelin/device';
|
|
8
|
+
import { chooseProfile, clearProfiles, loadProfiles, loadWatching, logout, resetWatching } from '../../store';
|
|
9
|
+
import Shell from '../../components/Shell';
|
|
10
|
+
import Action from '../../components/Action';
|
|
11
|
+
import Feedback from '../../components/Feedback';
|
|
12
|
+
import ContinueRail from '../../components/ContinueRail';
|
|
13
|
+
|
|
14
|
+
export default function Account() {
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
const auth = useAuth();
|
|
17
|
+
const dispatch = useDispatch();
|
|
18
|
+
const navigation = useNavigation();
|
|
19
|
+
const pending = useSelector(state => state.account.pending);
|
|
20
|
+
const people = useSelector(state => state.profiles.list);
|
|
21
|
+
const activeId = useSelector(state => state.profiles.activeId);
|
|
22
|
+
const profileStatus = useSelector(state => state.profiles.status);
|
|
23
|
+
const [confirming, setConfirming] = useState(false);
|
|
24
|
+
const [message, setMessage] = useState('');
|
|
25
|
+
const { width, height } = useWindowDimensions();
|
|
26
|
+
const gutter = width >= 840 && height >= 480 ? theme.spacing.xl : theme.spacing.md;
|
|
27
|
+
const signedIn = auth.status === 'signed-in';
|
|
28
|
+
const active = people.find(person => person.id === activeId);
|
|
29
|
+
useEffect(() => { if (signedIn && profileStatus === 'idle') dispatch(loadProfiles()); }, [signedIn, profileStatus]);
|
|
30
|
+
useEffect(() => { dispatch(resetWatching(activeId)); if (activeId.length > 0) dispatch(loadWatching(activeId)); }, [activeId]);
|
|
31
|
+
const signOut = () => {
|
|
32
|
+
setMessage('');
|
|
33
|
+
dispatch(logout()).unwrap().then(() => { setConfirming(false); dispatch(clearProfiles()); dispatch(resetWatching('')); }).catch(error => setMessage(error.message));
|
|
34
|
+
};
|
|
35
|
+
return (
|
|
36
|
+
<Screen>
|
|
37
|
+
<Shell active="Account">
|
|
38
|
+
{auth.status === 'loading' ? <Feedback title={t('common.loading')} message={t('common.checkingSignIn')} loading /> : (
|
|
39
|
+
<ScrollView style={styles.scroll} contentContainerStyle={styles.content}>
|
|
40
|
+
<View style={{ paddingHorizontal: gutter }}>
|
|
41
|
+
<Text style={styles.heading}>{t('account.title')}</Text>
|
|
42
|
+
{signedIn && (
|
|
43
|
+
<View style={people.length > 0 && styles.section}>
|
|
44
|
+
{people.length > 0 && <Text style={styles.sectionTitle}>{t('account.whoIsWatching')}</Text>}
|
|
45
|
+
<FocusGroup direction="horizontal" remember>
|
|
46
|
+
<View style={styles.people}>
|
|
47
|
+
{people.map(person => (
|
|
48
|
+
<View key={person.id} style={styles.person}>
|
|
49
|
+
<Pressable onPress={() => dispatch(chooseProfile(person.id))} style={[styles.avatar, person.id === activeId && styles.avatarActive]} focusAnimation={{ border: { color: theme.colors.primary, width: 2, offset: 3 }, scale: 1.06 }} accessibilityRole="button" accessibilityLabel={person.name} accessibilityState={{ selected: person.id === activeId }}>
|
|
50
|
+
{person.avatar ? <Image source={{ uri: person.avatar }} resizeMode="cover" style={styles.avatarImage} /> : <Text style={styles.initial}>{person.name.slice(0, 1).toUpperCase()}</Text>}
|
|
51
|
+
</Pressable>
|
|
52
|
+
<Text style={styles.personName} numberOfLines={1}>{person.name}</Text>
|
|
53
|
+
<Text style={styles.personState}>{person.id === activeId ? t('account.watchingNow') : ' '}</Text>
|
|
54
|
+
</View>
|
|
55
|
+
))}
|
|
56
|
+
</View>
|
|
57
|
+
</FocusGroup>
|
|
58
|
+
</View>
|
|
59
|
+
)}
|
|
60
|
+
</View>
|
|
61
|
+
{signedIn && active !== undefined && <View style={styles.rail}><ContinueRail title={t('account.pickUp', { name: active.name })} /></View>}
|
|
62
|
+
<View style={[styles.section, signedIn && styles.device, { marginHorizontal: gutter }]}>
|
|
63
|
+
<Text style={styles.sectionTitle}>{signedIn ? t('account.thisDevice') : t('common.signIn')}</Text>
|
|
64
|
+
<Text style={styles.description}>{signedIn ? confirming ? t('account.confirmSignOut') : t('account.signedIn') : t('account.signInPrompt')}</Text>
|
|
65
|
+
{message.length > 0 && <Text style={styles.error} accessibilityRole="alert">{message}</Text>}
|
|
66
|
+
{signedIn && confirming ? (
|
|
67
|
+
<FocusGroup direction="horizontal" autoFocus>
|
|
68
|
+
<View style={styles.actions}>
|
|
69
|
+
<View style={styles.action}><Action label={t('account.cancel')} onPress={() => setConfirming(false)} /></View>
|
|
70
|
+
<Action label={pending ? t('account.signingOut') : t('account.signOut')} primary onPress={() => { if (!pending) signOut(); }} />
|
|
71
|
+
</View>
|
|
72
|
+
</FocusGroup>
|
|
73
|
+
) : (
|
|
74
|
+
<FocusGroup direction="horizontal" remember>
|
|
75
|
+
<View style={styles.actions}>
|
|
76
|
+
{signedIn && <Action label={t('account.signOut')} onPress={() => setConfirming(true)} />}
|
|
77
|
+
{!signedIn && <View style={styles.action}><Action label={t('common.signIn')} primary onPress={() => navigation.navigate('SignIn')} /></View>}
|
|
78
|
+
{!signedIn && <Action label={t('common.createAccount')} onPress={() => navigation.navigate('SignUp')} />}
|
|
79
|
+
</View>
|
|
80
|
+
</FocusGroup>
|
|
81
|
+
)}
|
|
82
|
+
</View>
|
|
83
|
+
</ScrollView>
|
|
84
|
+
)}
|
|
85
|
+
</Shell>
|
|
86
|
+
</Screen>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const styles = StyleSheet.create({
|
|
91
|
+
scroll: { flex: 1 },
|
|
92
|
+
content: { paddingTop: Platform.select({ tv: 10, default: theme.spacing.md }), paddingBottom: theme.spacing.xl },
|
|
93
|
+
heading: { color: theme.colors.text, fontSize: Platform.select({ tv: 24, default: 30 }), lineHeight: Platform.select({ tv: 29, default: 36 }), fontWeight: '800', letterSpacing: -0.8 },
|
|
94
|
+
section: { marginTop: Platform.select({ tv: 22, default: theme.spacing.lg }) },
|
|
95
|
+
sectionTitle: { color: theme.colors.text, fontSize: Platform.select({ tv: 14, default: 18 }), lineHeight: Platform.select({ tv: 18, default: 24 }), fontWeight: '800' },
|
|
96
|
+
rail: { marginTop: Platform.select({ tv: 18, default: theme.spacing.lg }), marginBottom: Platform.select({ tv: -4, default: -theme.spacing.sm }) },
|
|
97
|
+
device: { alignSelf: 'flex-start', maxWidth: 560, paddingTop: Platform.select({ tv: 16, default: theme.spacing.lg }), borderTopWidth: 1, borderTopColor: theme.colors.border },
|
|
98
|
+
people: { flexDirection: 'row', marginTop: Platform.select({ tv: 12, default: 14 }) },
|
|
99
|
+
person: { width: Platform.select({ tv: 84, default: 96 }), alignItems: 'center', marginRight: Platform.select({ tv: 16, default: 12 }) },
|
|
100
|
+
avatar: { width: Platform.select({ tv: 64, default: 76 }), height: Platform.select({ tv: 64, default: 76 }), borderRadius: Platform.select({ tv: 32, default: 38 }), backgroundColor: theme.colors.surfaceLight, alignItems: 'center', justifyContent: 'center', overflow: 'hidden' },
|
|
101
|
+
avatarActive: { backgroundColor: theme.colors.primary },
|
|
102
|
+
avatarImage: { width: '100%', height: '100%' },
|
|
103
|
+
initial: { color: theme.colors.background, fontSize: Platform.select({ tv: 22, default: 26 }), lineHeight: Platform.select({ tv: 26, default: 30 }), fontWeight: '800' },
|
|
104
|
+
personName: { color: theme.colors.text, fontSize: Platform.select({ tv: 12, default: 14 }), lineHeight: Platform.select({ tv: 16, default: 19 }), fontWeight: '700', marginTop: 8 },
|
|
105
|
+
personState: { color: theme.colors.textMuted, fontSize: Platform.select({ tv: 10, default: 12 }), lineHeight: Platform.select({ tv: 13, default: 16 }) },
|
|
106
|
+
description: { color: theme.colors.textSecondary, fontSize: Platform.select({ tv: 12, default: 15 }), lineHeight: Platform.select({ tv: 17, default: 22 }), marginTop: 4, maxWidth: 440 },
|
|
107
|
+
actions: { flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', marginTop: Platform.select({ tv: 14, default: theme.spacing.md }) },
|
|
108
|
+
action: { marginRight: theme.spacing.sm },
|
|
109
|
+
error: { color: theme.colors.error, fontSize: Platform.select({ tv: 12, default: 14 }), lineHeight: Platform.select({ tv: 17, default: 20 }), marginTop: theme.spacing.sm },
|
|
110
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useState } from '@adelin/react';
|
|
2
|
+
import { useRoute } from '@adelin/navigation';
|
|
3
|
+
import { useTranslation } from '@adelin/i18n';
|
|
4
|
+
import { useDispatch, useSelector } from '@adelin/store';
|
|
5
|
+
import { FocusGroup, ScrollView, StyleSheet, Text, View, theme, useWindowDimensions, Screen } from '@adelin/ui';
|
|
6
|
+
import { Platform } from '@adelin/device';
|
|
7
|
+
import { loadLibrary } from '../../store';
|
|
8
|
+
import Shell from '../../components/Shell';
|
|
9
|
+
import CatalogGrid from '../../components/CatalogGrid';
|
|
10
|
+
import Feedback from '../../components/Feedback';
|
|
11
|
+
import Tab from '../../components/Tab';
|
|
12
|
+
|
|
13
|
+
export default function Browse() {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const dispatch = useDispatch();
|
|
16
|
+
const route = useRoute();
|
|
17
|
+
const entries = useSelector(state => state.library.entries);
|
|
18
|
+
const collections = useSelector(state => state.library.collections);
|
|
19
|
+
const status = useSelector(state => state.library.status);
|
|
20
|
+
const { width, height } = useWindowDimensions();
|
|
21
|
+
const gutter = width >= 840 && height >= 480 ? theme.spacing.xl : theme.spacing.md;
|
|
22
|
+
const [kind, setKind] = useState('all');
|
|
23
|
+
const [genre, setGenre] = useState('');
|
|
24
|
+
const holdsTitles = (collection: { entryIds: string[] }) => entries.some(entry => !entry.parentId && collection.entryIds.includes(entry.id));
|
|
25
|
+
const kinds = collections.filter(collection => collection.parentId == null && holdsTitles(collection));
|
|
26
|
+
const genres = collections.filter(collection => collection.parentId === kind && holdsTitles(collection));
|
|
27
|
+
const scope = collections.find(collection => collection.id === (genre.length > 0 ? genre : kind));
|
|
28
|
+
const titles = entries.filter(entry => !entry.parentId && (kind === 'all' || scope?.entryIds.includes(entry.id)));
|
|
29
|
+
const shortName = (name: string) => name.indexOf('All ') === 0 ? name.slice(4) : name;
|
|
30
|
+
return (
|
|
31
|
+
<Screen>
|
|
32
|
+
<Shell active="Browse">
|
|
33
|
+
{status === 'idle' || status === 'loading' ? <Feedback title={t('common.loading')} message={t('library.loading')} loading /> : status === 'failed' ? <Feedback title={t('library.failed')} message={t('common.checkConnection')} onRetry={() => dispatch(loadLibrary())} /> : (
|
|
34
|
+
<FocusGroup direction="vertical" remember>
|
|
35
|
+
<View style={styles.body}>
|
|
36
|
+
<View style={[styles.header, { paddingHorizontal: gutter }]}>
|
|
37
|
+
<Text style={styles.heading}>{t('browse.title')}</Text>
|
|
38
|
+
<Text style={styles.count}>{t(titles.length === 1 ? 'browse.oneTitle' : 'browse.titles', { count: titles.length })}</Text>
|
|
39
|
+
</View>
|
|
40
|
+
<FocusGroup direction="horizontal" remember>
|
|
41
|
+
<ScrollView horizontal style={styles.filters} contentContainerStyle={[styles.filterContent, { paddingHorizontal: gutter - theme.spacing.sm }]} showsHorizontalScrollIndicator={false}>
|
|
42
|
+
<Tab label={t('browse.all')} selected={kind === 'all'} onPress={() => { setKind('all'); setGenre(''); }} focusKey={route.key + '-kind-all'} />
|
|
43
|
+
{kinds.map(item => <Tab key={item.id} label={shortName(item.name)} selected={kind === item.id} onPress={() => { setKind(item.id); setGenre(''); }} focusKey={route.key + '-kind-' + item.id} />)}
|
|
44
|
+
</ScrollView>
|
|
45
|
+
</FocusGroup>
|
|
46
|
+
{genres.length > 0 && (
|
|
47
|
+
<FocusGroup direction="horizontal" remember>
|
|
48
|
+
<ScrollView horizontal style={styles.genres} contentContainerStyle={[styles.filterContent, { paddingHorizontal: gutter - theme.spacing.sm }]} showsHorizontalScrollIndicator={false}>
|
|
49
|
+
<Tab label={t('browse.allGenres')} selected={genre.length === 0} onPress={() => setGenre('')} focusKey={route.key + '-genre-all'} />
|
|
50
|
+
{genres.map(item => <Tab key={item.id} label={item.name} selected={genre === item.id} onPress={() => setGenre(item.id)} focusKey={route.key + '-genre-' + item.id} />)}
|
|
51
|
+
</ScrollView>
|
|
52
|
+
</FocusGroup>
|
|
53
|
+
)}
|
|
54
|
+
{scope !== undefined && (scope.note ?? '').length > 0 && <Text style={[styles.note, { paddingHorizontal: gutter }]} numberOfLines={2}>{scope.note}</Text>}
|
|
55
|
+
<CatalogGrid entries={titles} emptyTitle={t('browse.emptyTitle')} emptyMessage={t('browse.emptyMessage')} />
|
|
56
|
+
</View>
|
|
57
|
+
</FocusGroup>
|
|
58
|
+
)}
|
|
59
|
+
</Shell>
|
|
60
|
+
</Screen>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const styles = StyleSheet.create({
|
|
65
|
+
body: { flex: 1 },
|
|
66
|
+
header: { flexDirection: 'row', alignItems: 'baseline', paddingTop: Platform.select({ tv: 10, default: theme.spacing.md }) },
|
|
67
|
+
heading: { color: theme.colors.text, fontSize: Platform.select({ tv: 24, default: 30 }), lineHeight: Platform.select({ tv: 29, default: 36 }), fontWeight: '800', letterSpacing: -0.8 },
|
|
68
|
+
count: { color: theme.colors.textMuted, fontSize: Platform.select({ tv: 11, default: 13 }), lineHeight: Platform.select({ tv: 15, default: 18 }), fontWeight: '600', marginLeft: theme.spacing.md },
|
|
69
|
+
filters: { flexGrow: 0, marginTop: Platform.select({ tv: 8, default: 10 }) },
|
|
70
|
+
genres: { flexGrow: 0, marginTop: Platform.select({ tv: 2, default: 2 }) },
|
|
71
|
+
filterContent: { paddingBottom: Platform.select({ tv: 4, default: 6 }) },
|
|
72
|
+
note: { color: theme.colors.textMuted, fontSize: Platform.select({ tv: 11, default: 14 }), lineHeight: Platform.select({ tv: 15, default: 20 }), maxWidth: 640, marginTop: Platform.select({ tv: 4, default: 6 }), marginBottom: Platform.select({ tv: 4, default: 6 }) },
|
|
73
|
+
});
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import type { ContentItem } from '@adelin/content';
|
|
2
|
+
import { useEffect, useState } from '@adelin/react';
|
|
3
|
+
import { useNavigation, useRoute } from '@adelin/navigation';
|
|
4
|
+
import { useTranslation } from '@adelin/i18n';
|
|
5
|
+
import { useDispatch, useSelector } from '@adelin/store';
|
|
6
|
+
import { FocusGroup, Icon, Image, LinearGradient, Pressable, ScrollTarget, ScrollView, StyleSheet, Text, View, theme, useSafeAreaInsets, useWindowDimensions, Screen } from '@adelin/ui';
|
|
7
|
+
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from '@adelin/reanimated';
|
|
8
|
+
import { Platform } from '@adelin/device';
|
|
9
|
+
import { loadLibrary, loadWatched, loadWatching, toggleWatched } from '../../store';
|
|
10
|
+
import Shell from '../../components/Shell';
|
|
11
|
+
import Action from '../../components/Action';
|
|
12
|
+
import PlayAction from '../../components/PlayAction';
|
|
13
|
+
import Feedback from '../../components/Feedback';
|
|
14
|
+
import LibraryRail from '../../components/LibraryRail';
|
|
15
|
+
import TitleMeta from '../../components/TitleMeta';
|
|
16
|
+
import Tab from '../../components/Tab';
|
|
17
|
+
|
|
18
|
+
export default function Detail() {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
const navigation = useNavigation();
|
|
21
|
+
const route = useRoute();
|
|
22
|
+
const dispatch = useDispatch();
|
|
23
|
+
const entries = useSelector(state => state.library.entries);
|
|
24
|
+
const collections = useSelector(state => state.library.collections);
|
|
25
|
+
const status = useSelector(state => state.library.status);
|
|
26
|
+
const { width, height } = useWindowDimensions();
|
|
27
|
+
const insets = useSafeAreaInsets();
|
|
28
|
+
const wide = width >= 840 && height >= 480;
|
|
29
|
+
const [seasonIndex, setSeasonIndex] = useState(0);
|
|
30
|
+
const item = entries.find(entry => entry.id === route.params.id);
|
|
31
|
+
const parent = entries.find(entry => entry.id === item?.parentId);
|
|
32
|
+
const grandparent = entries.find(entry => entry.id === parent?.parentId);
|
|
33
|
+
const children = entries.filter(entry => entry.parentId === item?.id);
|
|
34
|
+
const siblings = item?.parentId ? entries.filter(entry => entry.parentId === item.parentId) : [];
|
|
35
|
+
const position = siblings.findIndex(entry => entry.id === item?.id);
|
|
36
|
+
const parentPosition = parent?.parentId ? entries.filter(entry => entry.parentId === parent.parentId).findIndex(entry => entry.id === parent.id) : -1;
|
|
37
|
+
const seasons = children.filter(entry => entry.kind === 'folder');
|
|
38
|
+
const season = seasons[seasonIndex];
|
|
39
|
+
const episodes = season !== undefined ? entries.filter(entry => entry.parentId === season.id) : children.filter(entry => entry.kind === 'item');
|
|
40
|
+
const firstEpisode = seasons.length > 0 ? entries.find(entry => entry.parentId === seasons[0].id) : children.find(entry => entry.kind === 'item');
|
|
41
|
+
const playTarget = item?.kind === 'item' ? item : firstEpisode;
|
|
42
|
+
const canPlay = playTarget?.playbackSource?.uri != null;
|
|
43
|
+
const genres = collections.filter(collection => collection.parentId != null && collection.entryIds.includes(item?.id ?? ''));
|
|
44
|
+
const shared = genres.length > 0 ? genres : collections.filter(collection => collection.entryIds.includes(item?.id ?? ''));
|
|
45
|
+
const related = entries.filter(entry => entry.id !== item?.id && !entry.parentId && shared.some(collection => collection.entryIds.includes(entry.id)));
|
|
46
|
+
const upNext = siblings.slice(position + 1);
|
|
47
|
+
const context = !item ? '' : item.kind === 'item' && parent && grandparent ? t('detail.episodeContext', { show: grandparent.title, season: parentPosition + 1, episode: position + 1 }) : parent ? parent.title + ' · ' + (item.label ?? '') + ' ' + (position + 1) : '';
|
|
48
|
+
const seasonName = season === undefined ? '' : season.title.indexOf(': ') >= 0 ? season.title.slice(season.title.indexOf(': ') + 2) : season.title;
|
|
49
|
+
const picture = item?.artwork.backdrop || item?.artwork.poster || parent?.artwork.backdrop;
|
|
50
|
+
const activeId = useSelector(state => state.profiles.activeId);
|
|
51
|
+
const rows = useSelector(state => state.watching.rows);
|
|
52
|
+
const watchedIds = useSelector(state => state.watching.watchedIds);
|
|
53
|
+
const titleId = (grandparent ?? parent ?? item)?.id ?? '';
|
|
54
|
+
const watched = item !== undefined && watchedIds.includes(item.id);
|
|
55
|
+
useEffect(() => { if (activeId.length > 0 && titleId.length > 0) dispatch(loadWatched({ profileId: activeId, entryId: titleId })); }, [activeId, titleId, rows]);
|
|
56
|
+
const toggle = () => {
|
|
57
|
+
if (item !== undefined && activeId.length > 0) dispatch(toggleWatched({ profileId: activeId, entryId: item.id, watched })).unwrap().then(() => dispatch(loadWatching(activeId))).catch(() => {});
|
|
58
|
+
};
|
|
59
|
+
const gutter = wide ? theme.spacing.xl : theme.spacing.md;
|
|
60
|
+
const synopsis = item?.description ?? '';
|
|
61
|
+
const logline = synopsis.indexOf('. ') >= 0 ? synopsis.slice(0, synopsis.indexOf('. ') + 1) : synopsis;
|
|
62
|
+
const reveal = useSharedValue(0.4);
|
|
63
|
+
const revealStyle = useAnimatedStyle(() => ({ opacity: reveal.value }));
|
|
64
|
+
useEffect(() => { reveal.value = withTiming(1, { duration: 220 }); }, [route.params.id]);
|
|
65
|
+
return (
|
|
66
|
+
<Screen>
|
|
67
|
+
<Shell active="" overlay contentAutoFocus>
|
|
68
|
+
{status === 'idle' || status === 'loading' ? <Feedback title={t('common.loading')} message={t('detail.loading')} loading /> : status === 'failed' ? <Feedback title={t('detail.failed')} message={t('common.checkConnection')} onRetry={() => dispatch(loadLibrary())} /> : !item ? (
|
|
69
|
+
<View style={styles.missing}><Feedback title={t('detail.goneTitle')} message={t('detail.goneMessage')} /><Action label={t('common.back')} onPress={() => navigation.goBack()} preferred /></View>
|
|
70
|
+
) : (
|
|
71
|
+
<ScrollView style={styles.scroll} contentContainerStyle={styles.content} showsVerticalScrollIndicator={false}>
|
|
72
|
+
<ScrollTarget y={0}>
|
|
73
|
+
<View>
|
|
74
|
+
{!wide && <View style={{ height: insets.top + 56 }} />}
|
|
75
|
+
<Animated.View style={[wide ? styles.band : styles.bandCompact, { height: wide ? Math.min(width / 2.39, height * 0.56) : width / 2.39 }, revealStyle]}>
|
|
76
|
+
{picture ? <Image source={{ uri: picture }} resizeMode="cover" style={styles.fill} /> : null}
|
|
77
|
+
{wide && <LinearGradient colors={[theme.gradients.heroDeep, theme.gradients.heroMiddle, theme.gradients.heroClear]} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} locations={[0, 0.3, 0.62]} style={styles.fill} pointerEvents="none" />}
|
|
78
|
+
{wide && <View style={styles.copy}><Heading item={item} context={context} logline={logline} canPlay={canPlay} watched={watched} signedIn={activeId.length > 0} routeKey={route.key} onToggle={toggle} /></View>}
|
|
79
|
+
</Animated.View>
|
|
80
|
+
{!wide && (
|
|
81
|
+
<Pressable onPress={() => navigation.goBack()} style={[styles.back, { top: insets.top + 8 }]} accessibilityRole="button" accessibilityLabel={t('common.back')}>
|
|
82
|
+
<Icon icon="ph:caret-left" size={22} color={theme.colors.text} />
|
|
83
|
+
</Pressable>
|
|
84
|
+
)}
|
|
85
|
+
{!wide && <View style={styles.copyCompact}><Heading item={item} context={context} logline={logline} canPlay={canPlay} watched={watched} signedIn={activeId.length > 0} routeKey={route.key} onToggle={toggle} /></View>}
|
|
86
|
+
</View>
|
|
87
|
+
</ScrollTarget>
|
|
88
|
+
{(item.description ?? '').length > logline.length && (
|
|
89
|
+
<View style={[styles.about, wide && styles.aboutWide, { paddingHorizontal: gutter }]}>
|
|
90
|
+
<Text style={styles.aboutTitle}>{t('detail.about')}</Text>
|
|
91
|
+
<Text style={styles.aboutText} numberOfLines={wide ? 3 : 8}>{item.description}</Text>
|
|
92
|
+
</View>
|
|
93
|
+
)}
|
|
94
|
+
{seasons.length > 1 && (
|
|
95
|
+
<View style={[styles.seasonBar, { paddingHorizontal: gutter - theme.spacing.sm }]}>
|
|
96
|
+
<FocusGroup direction="horizontal" remember>
|
|
97
|
+
<View style={styles.seasons}>
|
|
98
|
+
{seasons.map((entry, index) => <Tab key={entry.id} label={entry.label != null ? entry.label + ' ' + (index + 1) : t('detail.season', { number: index + 1 })} selected={index === seasonIndex} onPress={() => setSeasonIndex(index)} focusKey={route.key + '-season-' + entry.id} />)}
|
|
99
|
+
</View>
|
|
100
|
+
</FocusGroup>
|
|
101
|
+
{seasonName.length > 0 && <Text style={styles.seasonName} numberOfLines={1}>{seasonName}</Text>}
|
|
102
|
+
</View>
|
|
103
|
+
)}
|
|
104
|
+
{episodes.length > 0 && item.kind === 'folder' && <LibraryRail title={seasons.length > 1 ? '' : season !== undefined ? season.title : t('detail.episodes')} entries={episodes} variant="episode" numberFrom={1} watchedIds={watchedIds} />}
|
|
105
|
+
{item.kind === 'item' && parent !== undefined && <LibraryRail title={upNext.length > 0 ? t('detail.upNext') : t('detail.moreFrom', { title: parent.title })} entries={upNext.length > 0 ? upNext : siblings.filter(entry => entry.id !== item.id)} variant="episode" numberFrom={upNext.length > 0 ? position + 2 : 0} watchedIds={watchedIds} />}
|
|
106
|
+
{item.kind === 'item' && parent === undefined && <LibraryRail title={t('detail.moreLikeThis')} entries={related} />}
|
|
107
|
+
{item.kind === 'folder' && children.length === 0 && <Feedback title={t('detail.noEpisodes')} message={t('detail.noEpisodesMessage')} />}
|
|
108
|
+
</ScrollView>
|
|
109
|
+
)}
|
|
110
|
+
</Shell>
|
|
111
|
+
</Screen>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** Title, facts, logline and the play and watched actions; sits inside the band on wide screens and under it on phones. */
|
|
116
|
+
function Heading({ item, context, logline, canPlay, watched, signedIn, routeKey, onToggle }: { item: ContentItem; context: string; logline: string; canPlay: boolean; watched: boolean; signedIn: boolean; routeKey: string; onToggle: () => void }) {
|
|
117
|
+
const { t } = useTranslation();
|
|
118
|
+
return (
|
|
119
|
+
<View>
|
|
120
|
+
{context.length > 0 && <Text style={styles.context} numberOfLines={1}>{context}</Text>}
|
|
121
|
+
<Text style={styles.title} numberOfLines={2}>{item.title}</Text>
|
|
122
|
+
<View style={styles.meta}><TitleMeta item={item} /></View>
|
|
123
|
+
<Text style={styles.description} numberOfLines={3}>{logline.length > 0 ? logline : t('detail.noSynopsis')}</Text>
|
|
124
|
+
<FocusGroup direction="horizontal" remember autoFocus>
|
|
125
|
+
<View style={styles.actions}>
|
|
126
|
+
<View style={styles.action}><PlayAction item={item} focusKey={routeKey + '-play'} preferred /></View>
|
|
127
|
+
{item.kind === 'item' && signedIn && <Action label={watched ? t('detail.watched') : t('detail.markWatched')} icon={watched ? 'ph:check-circle-fill' : 'ph:check'} focusKey={routeKey + '-watched'} onPress={() => onToggle()} />}
|
|
128
|
+
{!canPlay && <Text style={styles.notice}>{item.kind === 'item' ? t('detail.noPlayback') : t('detail.episodesLater')}</Text>}
|
|
129
|
+
</View>
|
|
130
|
+
</FocusGroup>
|
|
131
|
+
</View>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const styles = StyleSheet.create({
|
|
136
|
+
scroll: { flex: 1 },
|
|
137
|
+
content: { paddingBottom: theme.spacing.xl },
|
|
138
|
+
band: { marginTop: 52, justifyContent: 'flex-end', overflow: 'hidden', backgroundColor: theme.colors.surface },
|
|
139
|
+
bandCompact: { width: '100%', backgroundColor: theme.colors.surface },
|
|
140
|
+
fill: { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, width: '100%', height: '100%' },
|
|
141
|
+
back: { position: 'absolute', left: theme.spacing.md, width: 40, height: 40, borderRadius: 20, alignItems: 'center', justifyContent: 'center', backgroundColor: theme.gradients.tag },
|
|
142
|
+
copy: { paddingHorizontal: theme.spacing.xl, paddingBottom: Platform.select({ tv: 20, default: 36 }), width: Platform.select({ tv: 540, default: 680 }) },
|
|
143
|
+
copyCompact: { paddingHorizontal: theme.spacing.md, paddingTop: theme.spacing.lg },
|
|
144
|
+
context: { color: theme.colors.textSecondary, fontSize: Platform.select({ tv: 12, default: 14 }), lineHeight: Platform.select({ tv: 16, default: 19 }), fontWeight: '600', marginBottom: Platform.select({ tv: 2, default: 4 }) },
|
|
145
|
+
title: { color: theme.colors.text, fontSize: Platform.select({ tv: 34, default: 40 }), lineHeight: Platform.select({ tv: 38, default: 44 }), fontWeight: '800', letterSpacing: -1.2 },
|
|
146
|
+
meta: { marginTop: Platform.select({ tv: 8, default: 10 }) },
|
|
147
|
+
description: { color: theme.colors.textSecondary, fontSize: Platform.select({ tv: 12, default: 15 }), lineHeight: Platform.select({ tv: 17, default: 22 }), marginTop: Platform.select({ tv: 8, default: 10 }), maxWidth: 460 },
|
|
148
|
+
actions: { flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', marginTop: Platform.select({ tv: 14, default: 18 }) },
|
|
149
|
+
action: { marginRight: Platform.select({ tv: 10, default: 10 }) },
|
|
150
|
+
notice: { color: theme.colors.textMuted, fontSize: Platform.select({ tv: 12, default: 14 }), lineHeight: Platform.select({ tv: 17, default: 20 }) },
|
|
151
|
+
about: { marginTop: Platform.select({ tv: 14, default: theme.spacing.lg }), marginBottom: Platform.select({ tv: 12, default: theme.spacing.lg }) },
|
|
152
|
+
aboutWide: { maxWidth: 760 },
|
|
153
|
+
aboutTitle: { color: theme.colors.text, fontSize: Platform.select({ tv: 14, default: 18 }), lineHeight: Platform.select({ tv: 18, default: 24 }), fontWeight: '800', marginBottom: Platform.select({ tv: 4, default: 6 }) },
|
|
154
|
+
aboutText: { color: theme.colors.textSecondary, fontSize: Platform.select({ tv: 11, default: 15 }), lineHeight: Platform.select({ tv: 16, default: 22 }) },
|
|
155
|
+
seasonBar: { alignItems: 'flex-start', marginTop: Platform.select({ tv: 12, default: theme.spacing.md }), marginBottom: Platform.select({ tv: 4, default: 8 }) },
|
|
156
|
+
seasons: { flexDirection: 'row' },
|
|
157
|
+
seasonName: { flexShrink: 1, color: theme.colors.textMuted, fontSize: Platform.select({ tv: 11, default: 13 }), lineHeight: Platform.select({ tv: 15, default: 18 }), fontWeight: '600', marginLeft: theme.spacing.sm, marginTop: 2, marginBottom: 4 },
|
|
158
|
+
missing: { flex: 1, alignItems: 'center', justifyContent: 'center', padding: theme.spacing.lg },
|
|
159
|
+
});
|