This commit is contained in:
@@ -8,14 +8,15 @@ const props = defineProps(['data']);
|
||||
const data = props.data;
|
||||
|
||||
const title = ref("");
|
||||
const last_session = ref("");
|
||||
|
||||
const container = ref(null);
|
||||
|
||||
onMounted(() => {
|
||||
title.value = data.name;
|
||||
last_session.value = new Date(data.last_opened).toISOString().slice(0, 10);
|
||||
|
||||
if (data.color && container.value) {
|
||||
container.value.style.background = `linear-gradient(90deg, ${data.color}, ${data.color}44)`;
|
||||
}
|
||||
|
||||
AddSound(container.value)
|
||||
});
|
||||
|
||||
@@ -31,11 +32,11 @@ function ViewCampaign(){
|
||||
<div class="main-campaign-entry-container-inner">
|
||||
<img class="campaign-icon" src="/img/def-avatar.jpg" draggable="false">
|
||||
<div class="campaign-info">
|
||||
<b>{{ title }}</b><br>Last session: <span>{{ last_session }}</span>
|
||||
<b>{{ title }}</b>
|
||||
</div>
|
||||
|
||||
<div class="campaign-user-actions">
|
||||
<button class="btn-primary button-small sound-click" v-on:click.prevent="ViewCampaign">{{ $t('general.view')}}</button>
|
||||
<button class="btn-primary button-small sound-click" v-on:click.prevent="ViewCampaign">{{ $t('general.open')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ onMounted(() => {
|
||||
});
|
||||
});
|
||||
|
||||
let GetColor = () => color;
|
||||
let GetColor = () => color.value;
|
||||
|
||||
defineExpose({ GetColor });
|
||||
</script>
|
||||
|
||||
@@ -48,12 +48,6 @@ function LogOut(){
|
||||
CreateWindow('login');
|
||||
}
|
||||
|
||||
function EditProfile(){
|
||||
CreateChildWindow(GetFirstWindowId('main_menu'), 'edit_profile', {
|
||||
user: GetUser()
|
||||
});
|
||||
}
|
||||
|
||||
function EditSettings(){
|
||||
CreateChildWindow(GetFirstWindowId('main_menu'), 'settings', {
|
||||
user: GetUser()
|
||||
@@ -102,7 +96,6 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<div class="main-user-actions">
|
||||
<button class="btn-primary button-small sound-click" v-on:click.prevent="EditProfile">{{ $t("main-menu.edit-profile") }}</button>
|
||||
<button class="btn-primary button-small sound-click" v-on:click.prevent="EditSettings">{{ $t("main-menu.settings") }}</button>
|
||||
<button class="btn-primary button-small sound-click" v-on:click.prevent="LogOut">{{ $t("main-menu.log-out") }}</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user