Skip to content

Commit

Permalink
fix: 🐝 remove latest info widget
Browse files Browse the repository at this point in the history
temporarily hides the latest info widget until we regain access to firebase for updated messaging
  • Loading branch information
MrDynamo committed Apr 10, 2024
1 parent 5a0a1fb commit bd3dc64
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
5 changes: 5 additions & 0 deletions apps/wizarr-frontend/src/components/Dashboard/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export default defineComponent({
methods: {
makeWidgets(widgets: WidgetOptions[]) {
widgets.forEach((widget) => {
// TODO: Remove LatestInfo widget until we figure out firebase access
// if (widget.type == 'LatestInfo') {
// this.grid?.removeWidget(widget.id);
// }
this.makeWidget(widget);
});
},
Expand Down
11 changes: 6 additions & 5 deletions apps/wizarr-frontend/src/stores/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ interface DashboardStoreState {
}

const defaultDashboard: WidgetOptions[] = [
{
id: nanoid(),
type: 'LatestInfo',
grid: { w: 6, h: 2 },
},
// TODO: Re-enable after we figure out firebase access
// {
// id: nanoid(),
// type: 'LatestInfo',
// grid: { w: 6, h: 2 },
// },
{
id: nanoid(),
type: 'InvitesTotal',
Expand Down
11 changes: 7 additions & 4 deletions apps/wizarr-frontend/src/widgets/default/LatestInfo.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<template>
<DefaultWidget icon="fa-info-circle">
<template v-show="false">
<DefaultWidget icon="fa-info-circle" v-show="false">
<template #title>
<div class="text-[20px] mt-[-5px] text-gray-500 dark:text-gray-300 mb-0 font-medium truncate text-ellipsis overflow-hidden">
<div class="text-[20px] mt-[-5px] text-gray-500 dark:text-gray-300 mb-0 font-medium truncate text-ellipsis
overflow-hidden">
{{ __("Latest Info") }}
</div>
</template>
<template #value>
<template v-if="latestInfo">
<TextClamp :autoResize="true" :max-lines="2" :text="latestInfo" class="text-sm text-gray-600 dark:text-gray-200 mb-0">
<TextClamp :autoResize="true" :max-lines="2" :text="latestInfo"
class="text-sm text-gray-600 dark:text-gray-200 mb-0">
<template #after>
<button @click="readMore" class="ml-2 text-gray-500 hover:underline">
{{ __("Read More") }}
Expand Down Expand Up @@ -40,6 +42,7 @@ export default defineComponent({
data() {
return {
latestInfo: null as string | null,
enabled: false
};
},
computed: {
Expand Down

0 comments on commit bd3dc64

Please sign in to comment.