- fixed RaspberryDisplay definition
- added axios library to plugins - added vue library to plugins - added tt-frontend-framework for vue with basic documentation - added git_merge_ts to additionalCSS - added git_merge_ts to additionalJS - added property JSGlobals - refactored RaspberryDisplay Module
This commit is contained in:
Vendored
+2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,45 @@
|
||||
# TheTool Vue Frontend Framework
|
||||
|
||||
## Components
|
||||
|
||||
### tt-page-title
|
||||
|
||||
The `tt-page-title` is used to create the Title and breadcumbs on the top of the page
|
||||
#### Props
|
||||
|
||||
- `title`: String - The title of the current page. This will be displayed prominently at the top of the breadcrumb navigation bar.
|
||||
- `path`: Array - An array of objects representing the breadcrumb path. Each object in the array should have the following properties:
|
||||
- `text`: String - The display text for the breadcrumb item.
|
||||
- `href`: String - The URL that the breadcrumb item links to.
|
||||
|
||||
#### Usage
|
||||
|
||||
Include the Component on the View
|
||||
```php
|
||||
$additionalJS = ["plugins/vue/tt-components/tt-page-title.js"];
|
||||
```
|
||||
|
||||
Then use it inside the Vue App
|
||||
```vue
|
||||
<tt-page-title :title="'Your Page Title'" :path="[
|
||||
{ text: 'Home', href: '/' },
|
||||
{ text: 'Library', href: '/library' },
|
||||
{ text: 'Data', href: '/library/data' } // Current Page
|
||||
]"></tt-page-title>
|
||||
```
|
||||
|
||||
### tt-loader
|
||||
|
||||
The `tt-loader` is used to display a loader
|
||||
|
||||
#### Usage
|
||||
|
||||
Include the Component on the View
|
||||
```php
|
||||
$additionalJS = ["plugins/vue/tt-components/tt-loader.js"];
|
||||
$additionalCSS = ["plugins/vue/tt-components/css/tt-loader.css"];
|
||||
```
|
||||
|
||||
Then use it inside the Vue App in the container where it should get full width
|
||||
```vue
|
||||
<tt-loader></tt-loader>
|
||||
@@ -0,0 +1,25 @@
|
||||
.overlay {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(10, 10, 10, 0.5); /* Semi-transparent black */
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center; /* Center the spinner vertically and horizontally */
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
opacity: 0.5;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
/* Define the transition */
|
||||
.fade-enter-active, .fade-leave-active {
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */
|
||||
{
|
||||
opacity: 0;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
Vue.component('tt-loader', {
|
||||
template: `
|
||||
<transition name="fade">
|
||||
<div class="w-100 h-100" style="position: absolute;">
|
||||
<div class="overlay" id="loading">
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
`
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
Vue.component('tt-page-title', {
|
||||
props: ['title', 'path'],
|
||||
template: `
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item" v-for="item in path" :key="item.text">
|
||||
<a :href="item.href">{{ item.text }}</a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">{{ title }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
+11
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user