apparently cardview toggle got removed from the settings, so might as well remove it from the code

master
Aevann 2023-02-19 11:20:16 +02:00
parent f5eea88ca3
commit 8158b70c20
6 changed files with 10 additions and 19 deletions

View File

@ -73,7 +73,6 @@ class User(Base):
titlecolor = Column(String, default=DEFAULT_COLOR)
theme = Column(String, default=DEFAULT_THEME)
themecolor = Column(String, default=DEFAULT_COLOR)
cardview = Column(Boolean, default=False)
song = Column(String)
highres = Column(String)
profileurl = Column(String)

View File

@ -179,7 +179,6 @@ def settings_personal_post(v):
return profanity_filter_updated
updated = updated or update_flag("hidevotedon", "hidevotedon")
updated = updated or update_flag("cardview", "cardview")
updated = updated or update_flag("newtab", "newtab")
updated = updated or update_flag("newtabexternal", "newtabexternal")
updated = updated or update_flag("nitter", "nitter")

View File

@ -222,24 +222,18 @@
</div>
{% endif %}
{% if p.is_image and not p.over_18 and ((v and v.cardview)) %}
<div class="ml-md-5 mt-3 mb-4 mx-sm-auto">
<a {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
<img loading="lazy" data-src="{{p.realurl(v)}}" src="/i/l.webp" class="img-fluid" style="max-height:20rem" alt="Unable to load image">
</a>
</div>
{% elif p.is_video %}
<div id="video-{{p.id}}" class="ml-md-5 {% if p.over_18 or not ((v and v.cardview)) %}d-none{% endif %} mt-4 mx-sm-auto">
{% if p.is_video %}
<div id="video-{{p.id}}" class="ml-md-5 d-none{ mt-4 mx-sm-auto">
<p class="resizable">
<video {% if p.thumburl %}poster="{{p.thumb_url}}"{% endif %} id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></video>
</p>
</div>
{% elif p.is_audio %}
<div id="video-{{p.id}}" class="ml-md-5 {% if p.over_18 or not ((v and v.cardview)) %}d-none{% endif %} mt-4 mx-sm-auto">
<div id="video-{{p.id}}" class="ml-md-5 d-none mt-4 mx-sm-auto">
<audio id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></audio>
</div>
{% elif p.is_youtube %}
<div id="video-{{p.id}}" class="{% if p.over_18 or not ((v and v.cardview)) %}d-none{% endif %} mt-3 mb-4 youtube_embed">
<div id="video-{{p.id}}" class="d-none mt-3 mb-4 youtube_embed">
{{p.embed | safe}}
</div>
{% endif %}

View File

@ -0,0 +1 @@
alter table users drop column cardview;

View File

@ -983,7 +983,6 @@ CREATE TABLE public.users (
controversial boolean DEFAULT false NOT NULL,
background character varying(40),
verified character varying(100),
cardview boolean NOT NULL,
received_award_count integer DEFAULT 0 NOT NULL,
nitter boolean,
truescore integer DEFAULT 0 NOT NULL,
@ -2805,4 +2804,3 @@ ALTER TABLE ONLY public.comments
--
-- PostgreSQL database dump complete
--

View File

@ -1,24 +1,24 @@
INSERT INTO public.users (
username, passhash, created_utc, admin_level, over_18, is_activated,
original_username, defaultsorting, defaultsortingcomments, defaulttime, namecolor, titlecolor, theme, themecolor,
cardview, reddit, pronouns, verified, profileurl, highres,
reddit, pronouns, verified, profileurl, highres,
marsify, last_viewed_post_notifs, last_viewed_log_notifs, last_viewed_reddit_notifs
) VALUES
('AutoJanny', '', extract(epoch from now()), 0, true, true,
'AutoJanny', 'hot', 'top', 'day', 'ff66ac', 'ff66ac', 'dark', 'ff66ac',
false, 'old.reddit.com', 'clean/itup', 'Verified', '/i/pfps/1.webp', '/i/pfps/1.webp',
'old.reddit.com', 'clean/itup', 'Verified', '/i/pfps/1.webp', '/i/pfps/1.webp',
0, 0, 0, 0),
('Snappy', '', extract(epoch from now()), 0, true, true,
'Snappy', 'hot', 'top', 'day', '62ca56', 'e4432d', 'dark', '30409f',
false, 'old.reddit.com', 'beep/boop', 'Verified', '/i/pfps/2.webp', '/i/pfps/2.webp',
'old.reddit.com', 'beep/boop', 'Verified', '/i/pfps/2.webp', '/i/pfps/2.webp',
0, 0, 0, 0),
('longpostbot', '', extract(epoch from now()), 0, true, true,
'longpostbot', 'hot', 'top', 'day', '62ca56', 'e4432d', 'dark', '30409f',
false, 'old.reddit.com', 'tl/dr', 'Verified', '/i/pfps/3.webp', '/i/pfps/3.webp',
'old.reddit.com', 'tl/dr', 'Verified', '/i/pfps/3.webp', '/i/pfps/3.webp',
0, 0, 0, 0),
('zozbot', '', extract(epoch from now()), 0, true, true,
'zozbot', 'hot', 'top', 'day', '62ca56', 'e4432d', 'dark', '30409f',
false, 'old.reddit.com', 'zoz/zle', 'Verified', '/i/pfps/4.webp', '/i/pfps/4.webp',
'old.reddit.com', 'zoz/zle', 'Verified', '/i/pfps/4.webp', '/i/pfps/4.webp',
0, 0, 0, 0);
--