mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-22 15:53:01 +00:00
API models into own TS module
This commit is contained in:
parent
4e1a9fa10d
commit
d1e2648f5f
2 changed files with 29 additions and 29 deletions
|
@ -137,39 +137,11 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ConfigModel, DayPartModel } from "@/lib/api";
|
||||
import { Options, Vue } from "vue-class-component";
|
||||
|
||||
import BulmaDrawer from "./bulma/Drawer.vue";
|
||||
|
||||
interface ConfigModel {
|
||||
puzzle: {
|
||||
solution: string;
|
||||
begin: string;
|
||||
end: string;
|
||||
closing: string;
|
||||
seed: string;
|
||||
};
|
||||
calendar: {
|
||||
config_file: string;
|
||||
background: string;
|
||||
};
|
||||
image: {
|
||||
size: number;
|
||||
border: number;
|
||||
fonts: { file: string; size: number }[];
|
||||
};
|
||||
webdav: {
|
||||
url: string;
|
||||
cache_ttl: number;
|
||||
config_file: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface DayPartModel {
|
||||
day: number;
|
||||
part: string;
|
||||
}
|
||||
|
||||
@Options({
|
||||
components: {
|
||||
BulmaDrawer,
|
||||
|
|
28
ui/src/lib/api.ts
Normal file
28
ui/src/lib/api.ts
Normal file
|
@ -0,0 +1,28 @@
|
|||
export interface ConfigModel {
|
||||
puzzle: {
|
||||
solution: string;
|
||||
begin: string;
|
||||
end: string;
|
||||
closing: string;
|
||||
seed: string;
|
||||
};
|
||||
calendar: {
|
||||
config_file: string;
|
||||
background: string;
|
||||
};
|
||||
image: {
|
||||
size: number;
|
||||
border: number;
|
||||
fonts: { file: string; size: number }[];
|
||||
};
|
||||
webdav: {
|
||||
url: string;
|
||||
cache_ttl: number;
|
||||
config_file: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface DayPartModel {
|
||||
day: number;
|
||||
part: string;
|
||||
}
|
Loading…
Reference in a new issue