Transparent disabled buttons, but not resetting disabled state on picture change, unless sidebar is closed.

This commit is contained in:
Peter - Ubuntu dual boot
2021-09-18 21:49:28 +01:00
parent 7da8898f69
commit cb397096d5
7 changed files with 87 additions and 30 deletions

28
api/graph/schema.graphqls Normal file
View File

@@ -0,0 +1,28 @@
# GraphQL schema example
#
# https://gqlgen.com/getting-started/
type Todo {
id: ID!
text: String!
done: Boolean!
user: User!
}
type User {
id: ID!
name: String!
}
type Query {
todos: [Todo!]!
}
input NewTodo {
text: String!
userId: String!
}
type Mutation {
createTodo(input: NewTodo!): Todo!
}

View File

@@ -1935,7 +1935,7 @@ type Album {
paginate: Pagination
): [Album!]!
"The album witch contains this album"
"The album which contains this album"
parentAlbum: Album
"The user who owns this album"
owner: User!
@@ -3367,9 +3367,9 @@ func (ec *executionContext) _Album_coverID(ctx context.Context, field graphql.Co
}
return graphql.Null
}
res := resTmp.(int)
res := resTmp.(*int)
fc.Result = res
return ec.marshalNInt2int(ctx, field.Selections, res)
return ec.marshalNInt2int(ctx, field.Selections, res)
}
func (ec *executionContext) _AuthorizeResult_success(ctx context.Context, field graphql.CollectedField, obj *models.AuthorizeResult) (ret graphql.Marshaler) {
@@ -12238,6 +12238,27 @@ func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.Selec
return res
}
func (ec *executionContext) unmarshalNInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
res, err := graphql.UnmarshalInt(v)
return &res, graphql.ErrorOnPath(ctx, err)
}
func (ec *executionContext) marshalNInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := graphql.MarshalInt(*v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "must not be null")
}
}
return res
}
func (ec *executionContext) marshalNMedia2githubᚗcomᚋphotoviewᚋphotoviewᚋapiᚋgraphqlᚋmodelsᚐMedia(ctx context.Context, sel ast.SelectionSet, v models.Media) graphql.Marshaler {
return ec._Media(ctx, sel, &v)
}

View File

@@ -272,7 +272,7 @@ func (r *mutationResolver) ResetAlbumCover(ctx context.Context, albumID int) (*m
return nil, errors.New("forbidden")
}
if err := r.Database.Model(&album).Update("cover_id", 0).Error; err != nil {
if err := r.Database.Model(&album).Update("cover_id", nil).Error; err != nil {
return nil, err
}

View File

@@ -278,6 +278,8 @@ type Album {
path: [Album!]!
shares: [ShareToken!]!
coverID: Int!
}
type MediaURL {