Merge pull request 'ga_IE Localisation, other localisation touchups' (#2) from Catster/campfire:design-v2 into design-v2
Reviewed-on: https://codeberg.org/arimelody/campfire/pulls/2
This commit is contained in:
commit
8e9fb6598e
6 changed files with 178 additions and 15 deletions
|
@ -29,6 +29,7 @@
|
|||
// let media_ids = [];
|
||||
let show_cw = false;
|
||||
let visibility = "Public";
|
||||
let visibilityLocale = lang.string('post.visibility.public');
|
||||
|
||||
const placeholders = lang.stringArray('compose_placeholders');
|
||||
let placeholder = Array.isArray(placeholders) ? placeholders[Math.floor(placeholders.length * Math.random())]
|
||||
|
@ -74,15 +75,19 @@
|
|||
switch (visibility) {
|
||||
case "Public":
|
||||
visibility = "Unlisted";
|
||||
visibilityLocale = lang.string('post.visibility.unlisted');
|
||||
break;
|
||||
case "Unlisted":
|
||||
visibility = "Followers only";
|
||||
visibilityLocale = lang.string('post.visibility.follow_only');
|
||||
break;
|
||||
case "Followers only":
|
||||
visibility = "Private";
|
||||
visibilityLocale = lang.string('post.visibility.private');
|
||||
break;
|
||||
case "Private":
|
||||
visibility = "Public";
|
||||
visibilityLocale = lang.string('post.visibility.public');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +107,7 @@
|
|||
<div class="composer-info" on:mouseup|stopPropagation>
|
||||
</div>
|
||||
</header>
|
||||
<div title={visibility}>
|
||||
<div title={visibilityLocale}>
|
||||
<Button centered={true} on:click={() => {cycleVisibility()}}>
|
||||
<svelte:fragment slot="icon">
|
||||
<!-- TODO: this should be a drop-down option!...later -->
|
||||
|
@ -120,7 +125,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{#if show_cw}
|
||||
<input type="text" id="" placeholder="Content warning" bind:value={content_warning}/>
|
||||
<input type="text" id="" placeholder="{lang.string('post.warning.placeholder')}" bind:value={content_warning}/>
|
||||
{/if}
|
||||
<textarea placeholder="{placeholder}" class="textbox" bind:value={content}></textarea>
|
||||
<div class="composer-footer">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<span class="post-context-time">
|
||||
<time title="{time_string}">{short_time(post.created_at)}</time>
|
||||
{#if post.visibility !== "public"}
|
||||
<span class="post-visibility">- {post.visibility}</span>
|
||||
<span class="post-visibility">- {lang.string(`post.visibility.${post.visibility}`)}</span>
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue