mirror of
https://github.com/Damillora/Shioriko.git
synced 2024-12-23 00:13:45 +00:00
fix: guard upload and edit post pages
This commit is contained in:
parent
5d239b0a05
commit
e5a0340680
@ -4,6 +4,7 @@
|
||||
import Tags from "svelte-tags-input";
|
||||
import { onMount } from "svelte";
|
||||
import { Link } from "svelte-routing";
|
||||
import AuthRequired from "../AuthRequired.svelte";
|
||||
|
||||
export let id;
|
||||
|
||||
@ -35,6 +36,8 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<AuthRequired />
|
||||
|
||||
<section class="hero is-primary">
|
||||
<div class="hero-body">
|
||||
<p class="title">Edit Post: {id}</p>
|
||||
@ -46,9 +49,7 @@
|
||||
<div class="columns">
|
||||
<div class="column is-one-third box">
|
||||
<p>
|
||||
<Link class="button is-primary" to="/post/{id}"
|
||||
>Back</Link
|
||||
>
|
||||
<Link class="button is-primary" to="/post/{id}">Back</Link>
|
||||
</p>
|
||||
<form on:submit|preventDefault={onSubmit}>
|
||||
<div class="field">
|
||||
@ -68,7 +69,7 @@
|
||||
<div class="control" id="tags">
|
||||
<Tags
|
||||
tags={form.tags}
|
||||
addKeys={[9,32]}
|
||||
addKeys={[9, 32]}
|
||||
on:tags={onTagChange}
|
||||
/>
|
||||
</div>
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { uploadBlob, postCreate } from "../api.js";
|
||||
import { navigate } from "svelte-routing";
|
||||
import Tags from "svelte-tags-input";
|
||||
import AuthRequired from "../AuthRequired.svelte";
|
||||
|
||||
let currentProgress = 0;
|
||||
|
||||
@ -38,6 +39,8 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<AuthRequired />
|
||||
|
||||
<section class="hero is-primary">
|
||||
<div class="hero-body">
|
||||
<p class="title">Upload</p>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user