2021-12-09 16:02:39 +01:00
|
|
|
<template>
|
|
|
|
|
<div class="settings">
|
|
|
|
|
<div class="settings-group" v-for="group in groups">
|
|
|
|
|
<h2 class="ui-headline settings-group-headline" v-localize="group.name"></h2>
|
|
|
|
|
<div class="settings-group-items">
|
2021-12-23 14:39:00 +01:00
|
|
|
<ui-link :to="item.url || '/'" v-for="item in group.items" :key="item.name" class="settings-group-item">
|
2021-12-09 16:02:39 +01:00
|
|
|
<span class="settings-group-item-icon">
|
|
|
|
|
<ui-icon :symbol="item.icon || 'fth-settings'" :size="18" />
|
2021-12-21 15:51:26 +01:00
|
|
|
<span v-if="item.alias === 'applications'" class="settings-group-item-count">{{appCount}}</span>
|
2021-12-09 16:02:39 +01:00
|
|
|
</span>
|
|
|
|
|
<p class="settings-group-item-text">
|
|
|
|
|
<strong v-localize="item.name"></strong>
|
|
|
|
|
<template v-if="item.description">
|
|
|
|
|
<br>
|
|
|
|
|
<ui-localize :value="item.description" :tokens="tokens" />
|
|
|
|
|
</template>
|
|
|
|
|
</p>
|
2021-12-23 14:39:00 +01:00
|
|
|
</ui-link>
|
2021-12-09 16:02:39 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<router-view name="footer"></router-view>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { useUiStore } from '../../ui/store';
|
2021-12-21 15:51:26 +01:00
|
|
|
import { useAppStore } from '../applications/store';
|
2021-12-09 16:02:39 +01:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'app-settings',
|
|
|
|
|
|
|
|
|
|
data: () => ({
|
|
|
|
|
page: true,
|
2021-12-21 15:51:26 +01:00
|
|
|
appCount: 0,
|
2021-12-09 16:02:39 +01:00
|
|
|
groups: [],
|
|
|
|
|
tokens: {
|
|
|
|
|
'zero_version': '0.0.1',
|
|
|
|
|
'plugin_count': 3
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
mounted()
|
|
|
|
|
{
|
|
|
|
|
this.groups = useUiStore().settingGroups;
|
2021-12-21 15:51:26 +01:00
|
|
|
this.appCount = useAppStore().applications.length;
|
2021-12-26 01:42:21 +01:00
|
|
|
|
|
|
|
|
if (!this.groups[1].items.find(x => x.alias === 'demo'))
|
|
|
|
|
{
|
|
|
|
|
this.groups[1].items.push({
|
|
|
|
|
alias: "demo",
|
|
|
|
|
description: "Demo all editor components",
|
|
|
|
|
icon: "fth-box",
|
|
|
|
|
isPlugin: true,
|
|
|
|
|
name: "Components",
|
|
|
|
|
url: "/settings/demo"
|
|
|
|
|
});
|
|
|
|
|
}
|
2021-12-09 16:02:39 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.settings
|
|
|
|
|
{
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
padding: 40px 80px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
max-width: 2000px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 80px 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.settings-group-items
|
|
|
|
|
{
|
|
|
|
|
display: grid;
|
|
|
|
|
gap: 20px;
|
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
margin-top: var(--padding-m);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a.settings-group-item
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
font-size: var(--font-size);
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: auto 1fr;
|
|
|
|
|
gap: 20px;
|
|
|
|
|
align-items: center;
|
2021-12-30 13:39:31 +01:00
|
|
|
|
|
|
|
|
/*&:hover .settings-group-item-icon
|
|
|
|
|
{
|
|
|
|
|
transform: rotate(5deg);
|
|
|
|
|
}*/
|
2021-12-09 16:02:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.settings-group-item-icon
|
|
|
|
|
{
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
width: 54px;
|
|
|
|
|
height: 54px;
|
|
|
|
|
background: var(--color-box);
|
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
box-shadow: var(--shadow-short);
|
|
|
|
|
color: var(--color-text);
|
2021-12-30 13:39:31 +01:00
|
|
|
transition: color 0.2s ease, transform 0.2s ease;
|
2021-12-21 15:51:26 +01:00
|
|
|
position: relative;
|
2021-12-09 16:02:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a.settings-group-item:hover .settings-group-item-icon
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.settings-group-item-text
|
|
|
|
|
{
|
|
|
|
|
line-height: 1.3;
|
|
|
|
|
color: var(--color-text-dim);
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
|
|
strong
|
|
|
|
|
{
|
|
|
|
|
display: inline-block;
|
2021-12-29 01:25:35 +01:00
|
|
|
margin-bottom: 3px;
|
2021-12-09 16:02:39 +01:00
|
|
|
color: var(--color-text);
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-21 15:51:26 +01:00
|
|
|
|
|
|
|
|
.settings-group-item-count
|
|
|
|
|
{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
background: var(--color-accent);
|
|
|
|
|
color: var(--color-accent-fg);
|
|
|
|
|
height: 22px;
|
|
|
|
|
width: 22px;
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
padding: 0 0;
|
|
|
|
|
text-align: center;
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: -4px;
|
|
|
|
|
right: -4px;
|
|
|
|
|
}
|
2021-12-09 16:02:39 +01:00
|
|
|
</style>
|