ctrl k
  • ■ ■ ■ ■
    client/src/pages/components/cards/user.html
    skipped 50 lines
    51 51   
    52 52   {# Secondary identifiers and elements. #}
    53 53   <div class="user-card__info">
    54  - {% if user.service %}
     54 + {% if user.service and user.service in g.external_sites %}
    55 55   <span
    56 56   class="user-card__service"
    57 57   {% if g.external_sites[user.service] -%}
    skipped 44 lines
  • ■ ■ ■ ■ ■ ■
    src/pages/posts.py
    skipped 45 lines
    46 46   max_offset = limit * 1000
    47 47   
    48 48   artist = None
    49  - display_data = None
     49 + display_data = {}
    50 50   query = request.args.get('q', default='').strip()
    51 51   offset = step_int(abs(parse_int(request.args.get('o'), 0)), limit)
    52 52   if result_type == 'posts':
    skipped 45 lines
    98 98   artist_id, scrape_user,
    99 99   mode='count', q=query,
    100 100   rating=query_rating)
     101 + 
     102 + # Make display data
     103 + if service and user_id:
     104 + display_data["href"] = {
     105 + 'twitter': 'https://x.com/{}',
     106 + 'fanbox': 'https://www.pixiv.net/fanbox/creator/{}',
     107 + 'fantia_products': 'https://fantia.jp/fanclubs/{}/products',
     108 + 'fantia': 'https://fantia.jp/fanclubs/{}',
     109 + 'subscribestar': 'https://www.subscribestar.com/{}'
     110 + }[service].format(user_id)
    101 111   
    102 112   props = ({**props, **{
    103 113   'rating': rating.name if rating else 'q',
    skipped 141 lines
Page is in error, reload to recover