Skip to content

Commit

Permalink
Merge pull request #546 from qor5/fix-activity-view-all
Browse files Browse the repository at this point in the history
activity: fix view all redirect
  • Loading branch information
molon authored Sep 3, 2024
2 parents 8ed65dc + 9cf4398 commit e654c64
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
6 changes: 5 additions & 1 deletion activity/timeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ func (c *TimelineCompo) MarshalHTML(ctx context.Context) ([]byte, error) {
URL(logModelBuilder.Info().ListingHref()).
Query("f_model_name", c.ModelName).
Query("f_model_keys", c.ModelKeys).
PushState(true).
Go(),
)
}).Else(func() h.HTMLComponent {
Expand Down Expand Up @@ -331,7 +332,10 @@ func (c *TimelineCompo) MarshalHTML(ctx context.Context) ([]byte, error) {
vars.%s = toplocals.deletingLogID
})
}`, presets.VarsPresetsDataChanged, varEditing, varCurrentActive)).
Attr("v-on-unmounted", fmt.Sprintf(`() => { delete(vars.%s.%s) }`, presets.VarsPresetsDataChanged, varEditing)).
Attr("v-on-unmounted", fmt.Sprintf(`() => {
delete(vars.%s.%s)
delete(vars.%s)
}`, presets.VarsPresetsDataChanged, varEditing, varCurrentActive)).
Children(
children...,
),
Expand Down
17 changes: 9 additions & 8 deletions presets/presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,9 @@ func newActiveWatcher(ctx *web.EventContext, varToWatch string) (h.HTMLComponent
varCurrentActive, idCurrentActive,
varToWatch,
varCurrentActive,
)), nil
)).Attr("v-on-unmounted", fmt.Sprintf(`() => {
vars.%s = '';
}`, varCurrentActive)), nil
}

func (b *Builder) rightDrawer(ctx *web.EventContext, r *web.EventResponse, comp h.HTMLComponent, width string) {
Expand Down Expand Up @@ -1495,14 +1497,13 @@ func (b *Builder) wrap(m *ModelBuilder, pf web.PageFunc) http.Handler {
i18n.LanguageTagFromContext(ctx.R.Context(), language.English).String(),
"-", "",
)
r.Body =
h.Div(
r.Body = h.Div(
VProgressLinear().
Attr(":active", "vars.globalProgressBar.show").
Attr(":model-value", "vars.globalProgressBar.value").
Attr("style", "position: fixed; z-index: 2000;").
Height(2).
Color(b.progressBarColor),
Attr(":active", "vars.globalProgressBar.show").
Attr(":model-value", "vars.globalProgressBar.value").
Attr("style", "position: fixed; z-index: 2000;").
Height(2).
Color(b.progressBarColor),
VLocaleProvider().Locale(currentVuetifyLocale).FallbackLocale("en").Children(r.Body),
)
}
Expand Down

0 comments on commit e654c64

Please sign in to comment.