Commit Graph

761 Commits

Author SHA1 Message Date
Hamid Reza Mohammadi
e6397afae4 fix shadow 2026-09-14 20:30:50 +03:30
Ehsan Mohandesi
cb7b1b03a3 Replace Spotify search with a validated music link box
The Spotify Web API integration stopped working, leaving /spotify unable to
suggest songs at all. Replace the artist/album/track search flow with a single
box where the user pastes a link to the track on a music service.

Links are checked against a hardcoded allow-list of legal streaming and store
domains so links to ripped audio cannot be submitted. The check lives in the
service layer, not just the page: any authenticated user can POST to
/api/ganjoor/song directly and bypass the UI. Hosts are matched against the
full host or a dot-prefixed suffix, so look-alikes such as
open.spotify.com.evil.com are rejected; https is required, and userinfo and
non-default ports are refused. Accepted URLs are canonicalised - https,
lowercased host, tracking parameters stripped - so the same track always yields
the same stored URL and duplicate detection actually works.

Links are stored under one new type, PoemMusicTrackType.MusicUrl, with the
platform derived from the host at render time. That needs no migration or
backfill, and supporting another service later needs no new enum value. The
duplicate check no longer keys on TrackType, which closes a gap where the same
URL could be resubmitted as a different type. Several links per poem remain
allowed; only an identical URL for the same poem is refused.

The Spotify search page and its OAuth plumbing are kept and simply redirect to
/musiclink while the existing SpotifyWorking flag is false, so the old flow can
be restored if that API ever works again.

Track URLs are no longer written through Html.Raw into href attributes. They
previously came from the Spotify API; now that they are user supplied, encoding
them prevents stored XSS.

Also fixes two latent bugs in SuggestSong that this flow would have hit: a null
dereference when TrackUrl is empty, and a singer lookup that matched any singer
with an empty Url.
2026-09-13 22:16:18 -05:00
Hamid Reza Mohammadi
0811bfd868 moderation new option 2026-09-13 13:39:48 +03:30
Hamid Reza Mohammadi
fb87847d65 recitation icons fix 2026-09-12 12:23:36 +03:30
Hamid Reza Mohammadi
157565496d lock on recitation 2026-09-12 12:15:01 +03:30
Hamid Reza Mohammadi
566ff6d002 go to current position of recitation 2026-09-12 09:42:42 +03:30
Hamid Reza Mohammadi
5ebf07d485 bottpm audio player 2026-09-12 07:38:52 +03:30
Hamid Reza Mohammadi
4369252060 recitation currrent audio sync fix 2026-09-11 07:47:15 +03:30
Hamid Reza Mohammadi
63832b57c9 editor improvements 2026-09-06 07:37:14 +03:30
Hamid Reza Mohammadi
b0ca62a579 editor improvements 2026-09-05 16:28:51 +03:30
Hamid Reza Mohammadi
96a36f2dc2 editor improvements 2026-09-05 16:08:00 +03:30
Hamid Reza Mohammadi
1ac05f2f18 improving editor 2026-09-05 15:30:50 +03:30
Hamid Reza Mohammadi
cdd6107319 changing css/js version numbers 2026-09-02 14:22:55 +03:30
Hamid Reza Mohammadi
ded7dc47c6 pagination fix 2026-08-30 07:41:08 +03:30
Hamid Reza Mohammadi
5ce907e88c filter by user nickname 2026-08-29 12:57:22 +03:30
Hamid Reza Mohammadi
523cdcd23a more info in examine user pages 2026-08-29 12:13:37 +03:30
hesamat
e84aacc3d4 Bump p8.css cache-busting version to 88
Update query-string version in all .cshtml layout links.
2026-08-21 12:54:18 -07:00
Hamid Reza Mohammadi
7415b343c1 user/role management 2026-08-21 08:41:31 +03:30
Hamid Reza Mohammadi
00f5e81da5 fixes for editor 2026-08-20 20:18:48 +03:30
Hesam Alizadeh
335193c592 Bump p8.css version to 87 and remove fill colors from theme toggle icons 2026-08-20 01:32:35 -07:00
Hamid Reza Mohammadi
c030a192d2 #498 export tajik data 2026-08-14 21:44:19 +03:30
Hamid Reza Mohammadi
6e44e4dec1 #498 ui for public data generation 2026-08-14 20:23:11 +03:30
Hamid Reza Mohammadi
1d67041247 #498 bug fix 2026-08-14 19:39:48 +03:30
Hamid Reza Mohammadi
3addf67fee #498 importing public data 2026-08-14 16:30:13 +03:30
Hamid Reza Mohammadi
839421ae73 #498 import public data 2026-08-14 16:10:47 +03:30
Hamid Reza Mohammadi
f3db50d512 session expiration bug fix 2026-08-10 07:56:39 +03:30
Hamid Reza Mohammadi
7b96e50a9d improve UI/UX of the User Area
#496
2026-08-07 08:37:28 +03:30
Hamid Reza Mohammadi
2752ee8a82 improve UI/UX of the User Area
#496
2026-08-06 21:55:47 +03:30
Hamid Reza Mohammadi
15701ef1d8 improve UI/UX of the User Area
#496
2026-08-06 21:23:44 +03:30
Hamid Reza Mohammadi
245faf0710 improve UI/UX of the User Area
#496
2026-08-06 21:09:25 +03:30
Hamid Reza Mohammadi
376bf2cf87 improve UI/UX of the User Area
#496
2026-08-06 20:29:57 +03:30
Hamid Reza Mohammadi
2356435a70 improve UI/UX of the User Area
#496
2026-08-06 20:03:38 +03:30
Hamid Reza Mohammadi
1b08a5c935 improve UI/UX of the User Area
#496
2026-08-06 19:48:02 +03:30
Hamid Reza Mohammadi
4a1d43a299 improve UI/UX of the Admin Area
#497
2026-08-05 18:45:38 +03:30
Hamid Reza Mohammadi
c94a67dcc6 improve UI/UX of the Admin Area
#497
2026-08-05 18:30:28 +03:30
Hamid Reza Mohammadi
f1deeb7895 improve UI/UX of the Admin Area
#497
2026-08-05 18:24:30 +03:30
Hamid Reza Mohammadi
8d528ddc13 improve UI/UX of the Admin Area
#497
2026-08-05 17:58:46 +03:30
Hamid Reza Mohammadi
5c9720ba1a mprove UI/UX of the Admin Area
#497
2026-08-05 17:44:30 +03:30
Hamid Reza Mohammadi
54ec1fc34f improve UI/UX of the User Area
#496
2026-08-05 17:29:09 +03:30
Hamid Reza Mohammadi
1c1e211ca9 improve UI/UX of the User Area
#496
2026-08-05 17:13:10 +03:30
Hamid Reza Mohammadi
aa4431b2d8 improve UI/UX of the User Area
#496
2026-08-05 17:02:08 +03:30
Hamid Reza Mohammadi
e52e2d87eb Merge branch 'main' of https://github.com/ganjoor/GanjoorService 2026-08-05 16:55:48 +03:30
Hamid Reza Mohammadi
e65652e4dc mprove UI/UX of the User Area
#496
2026-08-05 16:55:42 +03:30
Hamid Reza Mohammadi
f8a26835c0 improve UI/UX of the User Area
#496
2026-08-05 16:00:36 +03:30
Hamid Reza Mohammadi
2fee534f11 improve UI/UX of the User Area
#496
2026-08-05 13:58:27 +03:30
Hamid Reza Mohammadi
989defdf62 improve UI/UX of the User Area
#496
2026-08-05 13:56:18 +03:30
Hamid Reza Mohammadi
ada2dc5028 improve UI/UX of the User Area
#496
2026-08-05 13:23:37 +03:30
Claude
f09b9de84a User panel: Phase 0 shared UI foundations
- Add design-token stylesheet (wwwroot/css/user-panel.css): CSS variables
  derived from the existing p8.css palette (brand maroon, success/danger
  colors, radius, shadow), plus reusable component classes (card, button
  variants, alert, badge, empty state, pagination, list item, toast,
  confirm modal). Includes a prefers-color-scheme dark block compatible
  with the existing toggleColorScheme() mechanism in bk.js.
- Add wwwroot/js/user-panel.js: upConfirm() and upToast() helpers as
  styled, promise-based replacements for window.confirm()/alert(),
  falling back to the native dialogs if the modal/toast markup isn't
  present on a page.
- Add Areas/User/Pages/Shared/ partials: _Pagination (wraps the
  List<NameIdUrlImage> pattern already used by every list page),
  _EmptyState, _Toasts and _ConfirmModal (hosts, included once by the
  layout).
- Wire the new stylesheet/script and the toast/modal hosts into
  _UserPanelLayout.cshtml.
- Refactor Notifications.cshtml as a first demonstration: replaces the
  hand-rolled pagination loop, manual gray/lightsteelblue row
  alternation, and confirm()/alert() calls with the new components.

No backend/API changes. Rest of the User area is untouched pending
Phase 1+ (nav/dashboard, forms, remaining list pages, moderation
queues, editors).
2026-08-05 12:58:00 +03:30
Hamid Reza Mohammadi
b7b5c6b4bf refactoring 2026-07-20 15:13:21 +03:30
Hamid Reza Mohammadi
47f239a7a6 refactoring 2026-07-13 16:48:04 +03:30