-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- tweaks to auto-completions - changed where some tooltips appear - changed where the auto-completion menu appears - added Minecraft documentations
- Loading branch information
Showing
16 changed files
with
335 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<template> | ||
<v-dialog | ||
v-model="DOC_WINDOW.is_open" | ||
:max-width="is_fullscreen ? 2000 : 500" | ||
> | ||
<v-card> | ||
<v-card-title> | ||
<v-toolbar @dblclick.native="is_fullscreen = !is_fullscreen" height="30px"> | ||
<span class="window-title">Documentation</span> | ||
<v-spacer></v-spacer> | ||
<v-btn small icon @click.stop="is_fullscreen = !is_fullscreen"> | ||
<v-icon small>add</v-icon> | ||
</v-btn> | ||
<v-btn small icon @click.stop="DOC_WINDOW.close" class="last-btn"> | ||
<v-icon small>close</v-icon> | ||
</v-btn> | ||
</v-toolbar> | ||
</v-card-title> | ||
|
||
|
||
<v-card-text :style="`max-height: ${window_height * 0.75}px; height: ${is_fullscreen ? window_height * 0.75 : 500}px; overflow-y: auto;`"> | ||
<div ref="attach-documentation"></div> | ||
</v-card-text> | ||
</v-card> | ||
</v-dialog> | ||
</template> | ||
|
||
<script> | ||
import { DOC_LOADER, DOC_WINDOW } from "../../scripts/documentation/main"; | ||
export default { | ||
name: "documentation-main", | ||
data() { | ||
return { | ||
is_fullscreen: false, | ||
window_height: window.innerHeight, | ||
loaded_type: "", | ||
DOC_WINDOW, | ||
DOC_LOADER | ||
} | ||
}, | ||
created() { | ||
window.addEventListener("resize", this.onResize); | ||
}, | ||
mounted() { | ||
this.updateContent(); | ||
DOC_WINDOW.onOpen = () => this.updateContent(); | ||
}, | ||
destroyed() { | ||
window.removeEventListener("resize", this.onResize); | ||
}, | ||
methods: { | ||
onResize() { | ||
this.window_height = window.innerHeight; | ||
}, | ||
updateContent() { | ||
if(DOC_WINDOW.equals()) return; | ||
DOC_WINDOW.update(); | ||
this.$refs["attach-documentation"].innerHTML = DOC_LOADER.get(DOC_WINDOW.get()); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.last-btn { | ||
margin-right: 4px !important; | ||
} | ||
.window-title { | ||
margin-left: 8px; | ||
cursor: default; | ||
} | ||
.v-card__title { | ||
padding: 0; | ||
} | ||
.v-card__actions { | ||
padding: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<template> | ||
<div> | ||
<!-- <v-toolbar flat height="30px"> | ||
<v-tooltip bottom class="first"> | ||
<v-btn slot="activator" class="first" small icon> | ||
<v-icon small>settings</v-icon> | ||
</v-btn> | ||
<span>Manage</span> | ||
</v-tooltip> | ||
</v-toolbar> --> | ||
|
||
<v-container :style="`max-height: ${sidebar_height}px;`"> | ||
<v-progress-linear | ||
:color="show_loading ? 'warning' : 'success'" | ||
:value="DOC_LOADER.progress" | ||
:indeterminate="DOC_WINDOW.loading" | ||
/> | ||
|
||
<div v-if="DOC_LOADER.finished_loading"> | ||
<template v-for="(doc, i) in doc_list"> | ||
<v-btn | ||
:key="`btn.${i}`" | ||
@click.stop="() => DOC_WINDOW.open(doc)" | ||
block | ||
flat | ||
> | ||
<span>{{ doc }}</span> | ||
<v-spacer/> | ||
<v-icon>mdi-chevron-right</v-icon> | ||
</v-btn> | ||
|
||
<v-divider | ||
v-if="i + 1 < doc_list.length" | ||
:key="`divider.${i}`" | ||
/> | ||
</template> | ||
</div> | ||
</v-container> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { DOC_LOADER, DOC_WINDOW } from "../../../scripts/documentation/main"; | ||
import { DOC_LIST } from '../../../scripts/constants'; | ||
export default { | ||
name: "content-documentation", | ||
created() { | ||
window.addEventListener("resize", this.onResize); | ||
}, | ||
destroyed() { | ||
window.removeEventListener("resize", this.onResize); | ||
}, | ||
data() { | ||
return { | ||
sidebar_height: window.innerHeight - 140, | ||
DOC_LOADER, | ||
DOC_WINDOW | ||
} | ||
}, | ||
computed: { | ||
doc_list() { | ||
return DOC_LIST.sort((a, b) => { | ||
return a.toUpperCase().localeCompare(b.toUpperCase()); | ||
}); | ||
}, | ||
show_loading() { | ||
return !DOC_LOADER.finished_loading || DOC_WINDOW.loading; | ||
} | ||
}, | ||
methods: { | ||
onResize() { | ||
this.sidebar_height = window.innerHeight - 140; | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
div.container { | ||
padding: 4px; | ||
overflow-y: auto; | ||
} | ||
.v-btn { | ||
margin: 0; | ||
} | ||
.first { | ||
padding-left: 0.1em; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.