You've already forked AstralRinth
forked from didirus/AstralRinth
Fix packaging to correctly handle utils/
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import IconTrash from 'virtual:icons/heroicons-outline/trash'
|
||||
import IconUpload from 'virtual:icons/heroicons-outline/upload'
|
||||
import IconPhotograph from 'virtual:icons/heroicons-outline/photograph'
|
||||
import IconFile from 'virtual:icons/lucide/file'
|
||||
import { t } from 'svelte-intl-precompile'
|
||||
import Button from './Button.svelte'
|
||||
@@ -52,7 +53,11 @@
|
||||
{#each files as file (file.name)}
|
||||
<div class="file">
|
||||
<div class="file__tab">
|
||||
<IconFile />
|
||||
{#if file.type.startsWith('image/')}
|
||||
<IconPhotograph />
|
||||
{:else}
|
||||
<IconFile />
|
||||
{/if}
|
||||
<div class="file__tab__name"><b>{file.name}</b></div>
|
||||
<Button
|
||||
color="tertiary"
|
||||
@@ -61,7 +66,12 @@
|
||||
}}><IconTrash /> Remove</Button>
|
||||
</div>
|
||||
{#if file.type.startsWith('image/')}
|
||||
<img class="file__preview" src={URL.createObjectURL(file)} alt="Uploaded file preview" />
|
||||
<div class="file__preview">
|
||||
<img
|
||||
class="file__preview__image"
|
||||
src={URL.createObjectURL(file)}
|
||||
alt="Uploaded file preview" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
@@ -91,9 +101,9 @@
|
||||
}
|
||||
|
||||
.file {
|
||||
box-shadow: var(--shadow-inset);
|
||||
border-radius: var(--rounded);
|
||||
background-color: var(--color-button-bg);
|
||||
box-shadow: var(--shadow-raised-sm), var(--shadow-inset);
|
||||
|
||||
&__tab {
|
||||
display: flex;
|
||||
@@ -101,6 +111,12 @@
|
||||
padding: 0.75rem 1rem;
|
||||
gap: 1rem;
|
||||
|
||||
:global(.icon) {
|
||||
/* Uses `px` to make icons slightly larger */
|
||||
min-width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
&__name {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
@@ -112,6 +128,17 @@
|
||||
&__preview {
|
||||
width: 100%;
|
||||
border-radius: var(--rounded-bottom);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-color: black;
|
||||
|
||||
&__image {
|
||||
height: auto;
|
||||
max-height: 22rem;
|
||||
width: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
src/plugins/generator/index.d.ts
vendored
10
src/plugins/generator/index.d.ts
vendored
@@ -1,10 +0,0 @@
|
||||
export default function Generator(options: PluginOptions): {
|
||||
name: string
|
||||
buildStart(): Promise<void>
|
||||
}
|
||||
export interface PluginOptions {
|
||||
projectColors: boolean
|
||||
landingPage: boolean
|
||||
gameVersions: boolean
|
||||
tags: boolean
|
||||
}
|
||||
@@ -12,6 +12,21 @@ const API_URL =
|
||||
// Time to live: 7 days
|
||||
const TTL = 7 * 24 * 60 * 60 * 1000
|
||||
|
||||
/**
|
||||
* @typedef {Object} PluginResult
|
||||
* @property {string} name
|
||||
* @property {() => Promise<void>} buildStart
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generate JSON data from the backend
|
||||
* @param {Object} options Plugin options
|
||||
* @param {boolean} options.projectColors
|
||||
* @param {boolean} options.landingPage
|
||||
* @param {boolean} options.gameVersions
|
||||
* @param {boolean} options.tags
|
||||
* @returns {PluginResult}
|
||||
*/
|
||||
export default function Generator(options) {
|
||||
return {
|
||||
name: 'rollup-plugin-omorphia-generator',
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export declare function gameVersions(API_URL: string): Promise<void>
|
||||
@@ -1 +0,0 @@
|
||||
export declare function landingPage(API_URL: string): Promise<void>
|
||||
@@ -1 +0,0 @@
|
||||
export declare function projectColors(API_URL: string): Promise<void>
|
||||
1
src/plugins/generator/outputs/tags.d.ts
vendored
1
src/plugins/generator/outputs/tags.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export declare function tags(API_URL: string): Promise<void>
|
||||
Reference in New Issue
Block a user