1
0
mirror of https://git.sr.ht/~tsileo/microblog.pub synced 2025-06-05 21:59:23 +02:00

1 Commits

Author SHA1 Message Date
3423747f33 Remove data/_theme.scss from git history
- Remove data/_theme.scss from git history, to prevent accidental overwrites/commits
- Add a step to the configuration wizard to create a blank file if one doesn't exist
- Move the file existence check in compile-scss to before favicon building (as it errors if the file is missing)

Fixes https://todo.sr.ht/~tsileo/microblog.pub/67
2022-11-27 11:19:12 +01:00
6 changed files with 12 additions and 9 deletions

View File

@ -1,9 +1,8 @@
Thomas Sileo <t@a4.io> Thomas Sileo <t@a4.io>
Kevin Wallace <doof@doof.net> Kevin Wallace <doof@doof.net>
Miguel Jacq <mig@mig5.net> Miguel Jacq <mig@mig5.net>
Alexey Shpakovsky <alexey@shpakovsky.ru>
Josh Washburne <josh@jodh.us> Josh Washburne <josh@jodh.us>
Sam <samr1.dev@pm.me> Alexey Shpakovsky <alexey@shpakovsky.ru>
Ash McAllan <acegiak@gmail.com> Ash McAllan <acegiak@gmail.com>
Cassio Zen <cassio@hey.com> Cassio Zen <cassio@hey.com>
Cocoa <momijizukamori@gmail.com> Cocoa <momijizukamori@gmail.com>

View File

@ -427,7 +427,7 @@ async def _send_undo(db_session: AsyncSession, ap_object_id: str) -> None:
announced_object.announced_via_outbox_object_ap_id = None announced_object.announced_via_outbox_object_ap_id = None
# Send the Undo to the original recipients # Send the Undo to the original recipients
recipients = await _compute_recipients(db_session, announced_object.ap_object) recipients = await _compute_recipients(db_session, outbox_object.ap_object)
for rcp in recipients: for rcp in recipients:
await new_outgoing_activity(db_session, rcp, outbox_object.id) await new_outgoing_activity(db_session, rcp, outbox_object.id)
elif outbox_object_to_undo.ap_type == "Block": elif outbox_object_to_undo.ap_type == "Block":
@ -1379,7 +1379,7 @@ async def _revert_side_effect_for_deleted_object(
.values(likes_count=likes_count - 1) .values(likes_count=likes_count - 1)
) )
elif ( elif (
deleted_ap_object.ap_type == "Announce" deleted_ap_object.ap_type == "Annouce"
and deleted_ap_object.activity_object_ap_id and deleted_ap_object.activity_object_ap_id
): ):
related_object = await get_outbox_object_by_ap_id( related_object = await get_outbox_object_by_ap_id(

View File

@ -285,6 +285,7 @@ async def redirect_to_remote_instance(
async def index( async def index(
request: Request, request: Request,
db_session: AsyncSession = Depends(get_db_session), db_session: AsyncSession = Depends(get_db_session),
_: httpsig.HTTPSigInfo = Depends(httpsig.httpsig_checker),
page: int | None = None, page: int | None = None,
) -> templates.TemplateResponse | ActivityPubResponse: ) -> templates.TemplateResponse | ActivityPubResponse:
if is_activitypub_requested(request): if is_activitypub_requested(request):

View File

@ -1 +0,0 @@
// override vars for theming here

View File

@ -25,6 +25,10 @@ def _(event):
def main() -> None: def main() -> None:
theme_file = Path("data/_theme.scss")
if not theme_file.exists():
theme_file.write_text("// override vars for theming here")
print("Welcome to microblog.pub setup wizard\n") print("Welcome to microblog.pub setup wizard\n")
print("Generating key...") print("Generating key...")
if _KEY_PATH.exists(): if _KEY_PATH.exists():

View File

@ -46,16 +46,16 @@ def compile_scss(ctx, watch=False):
# type: (Context, bool) -> None # type: (Context, bool) -> None
from app.utils.favicon import build_favicon from app.utils.favicon import build_favicon
theme_file = Path("data/_theme.scss")
if not theme_file.exists():
theme_file.write_text("// override vars for theming here")
favicon_file = Path("data/favicon.ico") favicon_file = Path("data/favicon.ico")
if not favicon_file.exists(): if not favicon_file.exists():
build_favicon() build_favicon()
else: else:
shutil.copy2(favicon_file, "app/static/favicon.ico") shutil.copy2(favicon_file, "app/static/favicon.ico")
theme_file = Path("data/_theme.scss")
if not theme_file.exists():
theme_file.write_text("// override vars for theming here")
if watch: if watch:
run("boussole watch", echo=True) run("boussole watch", echo=True)
else: else: