uiuiui
This commit is contained in:
@@ -22,15 +22,18 @@ public class ApiApplicationResolverHandler : IBackofficeApplicationResolverHandl
|
||||
return false;
|
||||
}
|
||||
|
||||
string appKey = context.Request.Path.Value.Substring(path.Length).TrimStart('/').Split('/').ElementAtOrDefault(1);
|
||||
resolved = applications.FirstOrDefault();
|
||||
return resolved != null;
|
||||
|
||||
if (appKey.HasValue())
|
||||
{
|
||||
resolved = applications.FirstOrDefault(x => x.Alias == appKey);
|
||||
return resolved != null;
|
||||
}
|
||||
//string appKey = context.Request.Path.Value.Substring(path.Length).TrimStart('/').Split('/').ElementAtOrDefault(1);
|
||||
|
||||
resolved = null;
|
||||
return false;
|
||||
//if (appKey.HasValue())
|
||||
//{
|
||||
// resolved = applications.FirstOrDefault(x => x.Alias == appKey);
|
||||
// return resolved != null;
|
||||
//}
|
||||
|
||||
//resolved = null;
|
||||
//return false;
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ Axios.interceptors.request.use(config =>
|
||||
}
|
||||
|
||||
let locationQuery = Qs.parse(location.search.substring(1));
|
||||
let appKey = 'hofbauer';
|
||||
let appKey = 'system';
|
||||
|
||||
// set app key to system when required
|
||||
if (config.params['zero.system'] === true || locationQuery['zero.shared'] === "true")
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { paths } from '../options';
|
||||
import { useAppStore } from '../modules/applications/store';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'uiThumbnail',
|
||||
@@ -23,13 +24,19 @@
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
hasError: false
|
||||
hasError: false,
|
||||
appStore: null,
|
||||
}),
|
||||
|
||||
created()
|
||||
{
|
||||
this.appStore = useAppStore();
|
||||
},
|
||||
|
||||
computed: {
|
||||
src()
|
||||
{
|
||||
return this.media ? (paths.api.replace('{app}', 'hofbauer') + '/backoffice/ui/thumbnail/' + this.media + '-' + this.size + '.tmp') : null;
|
||||
return this.media ? (paths.api.replace('{app}', this.appStore.appId) + '/backoffice/ui/thumbnail/' + this.media + '-' + this.size + '.tmp') : null;
|
||||
},
|
||||
|
||||
onError(ev)
|
||||
|
||||
@@ -4,6 +4,7 @@ import api from './api';
|
||||
|
||||
export const useAppStore = defineStore('zero.apps', {
|
||||
state: () => ({
|
||||
appId: null,
|
||||
applications: []
|
||||
}),
|
||||
|
||||
@@ -12,6 +13,7 @@ export const useAppStore = defineStore('zero.apps', {
|
||||
{
|
||||
const response = await api.getByQuery({ pageSize: 1000 });
|
||||
this.applications = response.data;
|
||||
this.appId = this.applications[0].id;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -139,7 +139,7 @@
|
||||
this.zero.events.emit('page.create', response.model);
|
||||
}
|
||||
this.model = response.data;
|
||||
localStorage.setItem('zero.last-page.hofbauer' /* // TODO v3 appid + response.model.appId */, response.data.id);
|
||||
localStorage.setItem('zero.last-page' /* // TODO v3 appid + response.model.appId */, response.data.id);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
var instance = this;
|
||||
|
||||
let lastEditedPageId = localStorage.getItem('zero.last-page.hofbauer'); // TODO v3 + zero.appId);
|
||||
let lastEditedPageId = localStorage.getItem('zero.last-page'); // TODO v3 + zero.appId);
|
||||
|
||||
if (lastEditedPageId)
|
||||
{
|
||||
|
||||
@@ -219,7 +219,7 @@ class ListColumn
|
||||
|
||||
let title = typeof opts.titleFunc == 'function' ? opts.titleFunc(value, model) : '';
|
||||
|
||||
return `<img src="/zero/api/hofbauer/backoffice/ui/thumbnail/${(id)}-thumb.tmp" onerror="this.classList.add('is-error')" title="${title}" class="ui-table-field-image">`;
|
||||
return `<img src="/zero/api/root/backoffice/ui/thumbnail/${(id)}-thumb.tmp" onerror="this.classList.add('is-error')" title="${title}" class="ui-table-field-image">`;
|
||||
};
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export function patch(url: string, data: any, config?: ApiRequestConfig)
|
||||
export function url(url: string)
|
||||
{
|
||||
// TODO correct app
|
||||
return paths.api.replace('{app}', 'hofbauer') + '/' + url;
|
||||
return paths.api.replace('{app}', 'system') + '/' + url;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ public class UrlResult
|
||||
|
||||
public UrlResult(Uri domain, string url)
|
||||
{
|
||||
Domain = domain.Scheme + "://" + domain.Authority.TrimEnd("/");
|
||||
if (domain != null)
|
||||
{
|
||||
Domain = domain.Scheme + "://" + domain.Authority.TrimEnd("/");
|
||||
}
|
||||
Url = url;
|
||||
}
|
||||
}
|
||||
@@ -33,7 +36,10 @@ public class UrlsResult
|
||||
|
||||
public UrlsResult(Uri domain, params string[] urls)
|
||||
{
|
||||
Domain = domain.Scheme + "://" + domain.Authority.TrimEnd("/");
|
||||
if (domain != null)
|
||||
{
|
||||
Domain = domain.Scheme + "://" + domain.Authority.TrimEnd("/");
|
||||
}
|
||||
Urls = urls.Where(x => x.HasValue()).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user