some fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<i class="ui-loading" :class="{'is-big': isBig }"></i>
|
||||
<i class="ui-loading" :class="{'is-big': isBig || big, 'is-small': small }"></i>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -9,6 +9,14 @@
|
||||
isBig: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
big: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
small: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +42,12 @@
|
||||
height: 36px;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
&.is-small
|
||||
{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loadingRotation
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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">
|
||||
<ui-link :to="item.url || '/'" v-for="item in group.items" :key="item.name" class="settings-group-item">
|
||||
<component :is="getComponent(item)" :to="item.url || '/'" @click="onItemClick($event, item)" type="button" v-for="item in group.items" :key="item.name" class="settings-group-item">
|
||||
<span class="settings-group-item-icon">
|
||||
<ui-icon :symbol="item.icon || 'fth-settings'" :size="18" />
|
||||
<span v-if="item.alias === 'applications'" class="settings-group-item-count">{{appCount}}</span>
|
||||
@@ -15,7 +15,7 @@
|
||||
<ui-localize :value="item.description" :tokens="tokens" />
|
||||
</template>
|
||||
</p>
|
||||
</ui-link>
|
||||
</component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-footer" v-if="meta">
|
||||
@@ -57,17 +57,22 @@
|
||||
|
||||
this.groups = useUiStore().settingGroups;
|
||||
this.appCount = useAppStore().applications.length;
|
||||
},
|
||||
|
||||
if (!this.groups[1].items.find(x => x.alias === 'demo'))
|
||||
methods: {
|
||||
getComponent(item)
|
||||
{
|
||||
this.groups[1].items.push({
|
||||
alias: "demo",
|
||||
description: "Demo all editor components",
|
||||
icon: "fth-box",
|
||||
isPlugin: true,
|
||||
name: "Components",
|
||||
url: "/settings/demo"
|
||||
});
|
||||
return typeof item.action === 'function' ? 'button' : 'ui-link';
|
||||
},
|
||||
|
||||
onItemClick(ev, item)
|
||||
{
|
||||
if (typeof item.action !== 'function')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
item.action();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,7 +101,7 @@
|
||||
margin-top: var(--padding-m);
|
||||
}
|
||||
|
||||
a.settings-group-item
|
||||
a.settings-group-item, button.settings-group-item
|
||||
{
|
||||
color: var(--color-text);
|
||||
font-size: var(--font-size);
|
||||
@@ -104,11 +109,6 @@
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: 20px;
|
||||
align-items: center;
|
||||
|
||||
/*&:hover .settings-group-item-icon
|
||||
{
|
||||
transform: rotate(5deg);
|
||||
}*/
|
||||
}
|
||||
|
||||
.settings-group-item-icon
|
||||
@@ -126,7 +126,7 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
a.settings-group-item:hover .settings-group-item-icon
|
||||
.settings-group-item:hover .settings-group-item-icon
|
||||
{
|
||||
color: var(--color-text);
|
||||
}
|
||||
@@ -140,9 +140,22 @@
|
||||
strong
|
||||
{
|
||||
display: inline-block;
|
||||
margin-bottom: 3px;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
span
|
||||
{
|
||||
color: var(--color-text-dim);
|
||||
margin-top: 3px;
|
||||
font-size: var(--font-size-s);
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: normal;
|
||||
-webkit-line-clamp: 1;
|
||||
max-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-group-item-count
|
||||
|
||||
@@ -105,21 +105,25 @@ export function message(title: string, text?: string)
|
||||
}
|
||||
|
||||
|
||||
export function editor(editorAlias: string, model: any, title?: string, options?: OverlayOptions)
|
||||
export function editor(editorAlias: string, model: any, title?: string, confirmButton?: string, options?: OverlayOptions)
|
||||
{
|
||||
return open(extendObject({
|
||||
let fullOptions = extendObject({
|
||||
alias: 'editor',
|
||||
display: 'editor',
|
||||
model: {
|
||||
editor: editorAlias,
|
||||
value: model,
|
||||
title: title || '@ui.edit.title',
|
||||
},
|
||||
autoclose: false,
|
||||
softdismiss: false,
|
||||
component: () => import('../editor/ui-editor-overlay.vue'),
|
||||
width: 820
|
||||
}, options || {}));
|
||||
}, options || {});
|
||||
|
||||
fullOptions.model = {
|
||||
editor: editorAlias,
|
||||
value: model,
|
||||
title: title || '@ui.edit.title',
|
||||
confirmButton: confirmButton || '@ui.confirm'
|
||||
};
|
||||
|
||||
return open(fullOptions);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -93,6 +93,11 @@ export async function send(config: ApiRequestConfig)
|
||||
|
||||
export function download(response: AxiosResponse)
|
||||
{
|
||||
if (response.status != 200)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
let filename = response.headers["zero-filename"] || 'download.bin';
|
||||
|
||||
// code from: https://github.com/kennethjiang/js-file-download/blob/master/file-download.js
|
||||
|
||||
@@ -31,9 +31,9 @@ public class ExcelCreator<T> : ITableCreator<T>
|
||||
{
|
||||
Localizer = localizer;
|
||||
Columns = columns;
|
||||
LinkText = localizer.Text("ui.link");
|
||||
YesText = localizer.Text("ui.yes");
|
||||
NoText = localizer.Text("ui.no");
|
||||
LinkText = "Link"; // localizer.Text("ui.link");
|
||||
YesText = "yes"; // localizer.Text("ui.yes");
|
||||
NoText = "no"; // localizer.Text("ui.no");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user