diff --git a/tubbymemes/routes/meme.py b/tubbymemes/routes/meme.py index 402376e..b7b8edb 100644 --- a/tubbymemes/routes/meme.py +++ b/tubbymemes/routes/meme.py @@ -29,7 +29,7 @@ def mod(): if not current_user.is_authenticated: flash('You must be logged in and have MetaMask wallet connected.', 'warning') return redirect(url_for('meme.index')) - if not current_user.is_moderator(): + if not current_user.moderator: flash('You are not a moderator.', 'warning') return redirect(url_for('meme.index')) memes = Meme.query.filter( @@ -43,9 +43,6 @@ def publish(): if not current_user.is_authenticated: flash('You need to connect your wallet first.', 'warning') return redirect(url_for('meme.index')) - if not current_user.wownero_address: - flash('You need to specify your Wownero wallet address first.', 'warning') - return redirect(url_for('user.show', handle=current_user.handle)) meme = None try: client = ipfsApi.Client('127.0.0.1', 5001) @@ -76,7 +73,7 @@ def publish(): ) db.session.add(meme) db.session.commit() - if current_user.verified or current_user.is_moderator(): + if current_user.verified or current_user.moderator: res = upload_to_ipfs(meme.id) meme.meta_ipfs_hash = res[0] meme.meme_ipfs_hash = res[1] @@ -104,7 +101,7 @@ def show(meme_id): if not meme.approved and not current_user.is_authenticated: flash('You need to be logged in to view that meme.', 'warning') return redirect(url_for('meme.index')) - elif not meme.approved and not current_user.is_moderator(): + elif not meme.approved and not current_user.moderator: flash('You need to be a moderator to view that meme.', 'warning') return redirect(url_for('meme.index')) return render_template('meme.html', meme=meme) @@ -115,7 +112,7 @@ def approve(meme_id, action): if not current_user.is_authenticated: flash('You need to be logged in to reach this page.', 'warning') return redirect(url_for('meme.index')) - if not current_user.is_moderator(): + if not current_user.moderator: flash('You need to be a moderator to reach this page.', 'warning') return redirect(url_for('meme.index')) meme = Meme.query.get(meme_id) diff --git a/tubbymemes/templates/includes/meme_card.html b/tubbymemes/templates/includes/meme_card.html index bcb208f..377d7b1 100644 --- a/tubbymemes/templates/includes/meme_card.html +++ b/tubbymemes/templates/includes/meme_card.html @@ -21,17 +21,14 @@
- {% if meme.user.profile_image %}
- {{ meme.user.handle }} pfp + {{ meme.user.id }} pfp
- {% endif %}
diff --git a/tubbymemes/templates/includes/navbar.html b/tubbymemes/templates/includes/navbar.html index 5ac1798..5bf98aa 100644 --- a/tubbymemes/templates/includes/navbar.html +++ b/tubbymemes/templates/includes/navbar.html @@ -8,7 +8,6 @@ {% if request.path == '/' %} About {% if current_user.is_authenticated %} - Profile Disconnect {% if current_user.is_moderator() %} Mod diff --git a/tubbymemes/templates/includes/scripts.html b/tubbymemes/templates/includes/scripts.html index b8f444c..445ffb0 100644 --- a/tubbymemes/templates/includes/scripts.html +++ b/tubbymemes/templates/includes/scripts.html @@ -1,6 +1,4 @@ - - + {% endif %} diff --git a/tubbymemes/templates/profile.html b/tubbymemes/templates/profile.html deleted file mode 100644 index a32d5a7..0000000 --- a/tubbymemes/templates/profile.html +++ /dev/null @@ -1,236 +0,0 @@ -{% set is_user = current_user == user %} - - - {% include 'includes/head.html' %} - -
-
- - {% include 'includes/navbar.html' %} - - {% if user %} -
-
-
-

From Avalanche Blockchain

-

Handle: ?

-

Wownero Address: ?

-

Profile IPFS Hash: ?

-

Tipped AVAX: ?

-

Tipped WOWX: ?

-

Tipped WOW: ?

- -

From Local Database

- {# Handle #} - {% if is_user %} -
- -
-
- -

The username/handle you want to be referenced by.

-
- -
-
- {% else %} -

Handle: {{ user.handle }}

- {% endif %} - - {# Wownero Address #} - {% if is_user %} -
- -
-
- -

The Wownero wallet address you want to receive tips on.

-
- -
-
- {% else %} -

Wownero Address: {{ user.wownero_address or '?' }}

- {% endif %} - - {# Metadata IPFS Hash #} - {% if is_user %} -
- -
-
- -

The IPFS hash of your profile metadata.

-
- -
-
- {% else %} -

Metadata IPFS Hash: {{ user.ipfs_hash or '' }}

- {% endif %} - -

Register Date: {{ user.register_date }} ({{ user.register_date | humanize }})

-

Last Login Date: {{ user.last_login_date }} ({{ user.last_login_date | humanize }})

-

Moderator: {{ user.is_moderator() }}

-

Verified: {{ user.verified }}

-

Memes Posted: {{ user.memes | length }}

- {% if user.bio %} -

Bio: {{ user.bio }}

- {% endif %} - {% if user.website %} -

Website: {{ user.website_url }}

- {% endif %} - {% if is_user %} -

Save DB

- {% endif %} -
-
-
- {% endif %} - -
-
- {% include 'includes/footer.html' %} - - - - - diff --git a/tubbymemes/templates/publish.html b/tubbymemes/templates/publish.html index dff0c46..18d0b56 100644 --- a/tubbymemes/templates/publish.html +++ b/tubbymemes/templates/publish.html @@ -25,14 +25,14 @@
- +
- +
@@ -40,7 +40,7 @@