Compare commits

...

3 Commits

Author SHA1 Message Date
Patrick Jentsch
fe0fcb0e10 fix job status notifications 2024-05-27 09:24:40 +02:00
Patrick Jentsch
32fa632961 move anonymous user to seperate file 2024-05-27 09:23:08 +02:00
Patrick Jentsch
562b8d5ce0 Move clearfix to helpers.scss 2024-05-27 08:58:04 +02:00
6 changed files with 18 additions and 16 deletions

View File

@ -1,7 +1,7 @@
from enum import Enum from enum import Enum
from flask_login import AnonymousUserMixin
from app import db, login, mail, socketio from app import db, login, mail, socketio
from app.email import create_message from app.email import create_message
from .anonymous_user import *
from .avatar import * from .avatar import *
from .corpus_file import * from .corpus_file import *
from .corpus_follower_association import * from .corpus_follower_association import *
@ -142,14 +142,6 @@ def job_after_update_handler(mapper, connection, job):
mail.send(msg) mail.send(msg)
class AnonymousUser(AnonymousUserMixin):
def can(self, permissions):
return False
@property
def is_administrator(self):
return False
login.anonymous_user = AnonymousUser login.anonymous_user = AnonymousUser

View File

@ -0,0 +1,10 @@
from flask_login import AnonymousUserMixin
class AnonymousUser(AnonymousUserMixin):
def can(self, permissions):
return False
@property
def is_administrator(self):
return False

View File

@ -95,7 +95,7 @@ nopaque.App = class App {
.filter((operation) => {return subRegExp.test(operation.path);}); .filter((operation) => {return subRegExp.test(operation.path);});
for (let operation of subFilteredPatch) { for (let operation of subFilteredPatch) {
let [match, userId, jobId] = operation.path.match(subRegExp); let [match, userId, jobId] = operation.path.match(subRegExp);
this.flash(`[<a href="/jobs/${jobId}">${this.data.users[userId].jobs[jobId].title}</a>] New status: <span class="job-status-text" data-status="${operation.value}"></span>`, 'job'); this.flash(`[<a href="/jobs/${jobId}">${this.data.users[userId].jobs[jobId].title}</a>] New status: <span class="job-status-text" data-job-status="${operation.value}"></span>`, 'job');
} }
// Apply Patch // Apply Patch

View File

@ -1,5 +0,0 @@
.clearfix::after {
clear: both;
content: "";
display: block;
}

View File

@ -1,3 +1,9 @@
.clearfix::after {
clear: both;
content: "";
display: block;
}
.clickable { .clickable {
cursor: pointer !important; cursor: pointer !important;
} }

View File

@ -9,7 +9,6 @@
// Components // Components
@import "components/base-colors"; @import "components/base-colors";
@import "components/clearfix";
@import "components/corpus-status-color"; @import "components/corpus-status-color";
@import "components/helpers.scss"; @import "components/helpers.scss";
@import "components/job-status-color"; @import "components/job-status-color";