branch bow-v2-go updated (24cee2c -> dd7e1f8)
This is an automated email from the git hooks/post-receive script. New change to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git from 24cee2c ajout de l'edition des tags new 823c006 ajout de la method http dans les stats new dd7e1f8 ajout de la suppression d'un bookmark The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit dd7e1f881efa28b81d72d1e7224457e2e15c386b Author: Benjamin <poussin@codelutin.com> Date: Mon May 18 02:50:38 2020 +0200 ajout de la suppression d'un bookmark commit 823c006422af7e54486c421000aa4f66e454a80b Author: Benjamin <poussin@codelutin.com> Date: Mon May 18 02:27:52 2020 +0200 ajout de la method http dans les stats Summary of changes: pkg/http/router.go | 2 +- web/src/components/Bookmark.vue | 87 +++++++++++++++++++++++++++-------------- 2 files changed, 59 insertions(+), 30 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit 823c006422af7e54486c421000aa4f66e454a80b Author: Benjamin <poussin@codelutin.com> Date: Mon May 18 02:27:52 2020 +0200 ajout de la method http dans les stats --- pkg/http/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/http/router.go b/pkg/http/router.go index a97d2e1..08e4e34 100644 --- a/pkg/http/router.go +++ b/pkg/http/router.go @@ -230,7 +230,7 @@ func authentication(next http.Handler) http.Handler { } routeName := getRouteName(r) - restStat := stats.StartStat(fmt.Sprintf("rest(%v)", routeName), r.URL.String()) + restStat := stats.StartStat(fmt.Sprintf("rest(%s %v)", r.Method, routeName), r.URL.String()) next.ServeHTTP(w, r) restStat.Stop() }) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit dd7e1f881efa28b81d72d1e7224457e2e15c386b Author: Benjamin <poussin@codelutin.com> Date: Mon May 18 02:50:38 2020 +0200 ajout de la suppression d'un bookmark --- web/src/components/Bookmark.vue | 87 +++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/web/src/components/Bookmark.vue b/web/src/components/Bookmark.vue index 4f03812..5c98f7d 100644 --- a/web/src/components/Bookmark.vue +++ b/web/src/components/Bookmark.vue @@ -1,33 +1,45 @@ <template> -<div> - <div class="bookmark"> - <LinkCount class="screenshot" :bookmarkId="bookmark.id" :link="bookmark.uri"> - <img v-if="bookmark.screenshot" :src="hexaToImg(bookmark.screenshot)" /> - </LinkCount> - <div class="info"> - <div class="info-header"> - <Visit :visit="bookmark.visit"></Visit> - <LinkCount :bookmarkId="bookmark.id" :link="bookmark.uri"> - <img v-if="bookmark.favicon" :src="hexaToImg(bookmark.favicon)" /> - </LinkCount> - <LinkCount class="uri" :bookmarkId="bookmark.id" :link="bookmark.uri"> - {{ bookmark.uri }} - </LinkCount> - <button @click.prevent="edit">Edit</button> - </div> - <!-- <span>{{ bookmark.authenticationinfo }}</span> faire afficher une popup de modification de l'objet auth--> - <Description :description="bookmark.description"></Description> - <div class="info-footer"> - <BookmarkDate :creationDate="date" :updateDate="bookmark.updatedate"></BookmarkDate> - <Tags :tags="bookmark.tags"></Tags> - <!-- <span>{{ bookmark.lang }}</span> --> - <!-- <span>{{ bookmark.owner }}</span> si mon id n'est pas le meme alors c'est le bookmark d'un autre partage par un group --> - <Aliases :bookmarkId="bookmark.id" :link="bookmark.uri" :aliases="bookmark.privatealias" title="alias privé"></Aliases> - <Aliases :bookmarkId="bookmark.id" :link="bookmark.uri" :aliases="bookmark.publicalias" title="alias public"></Aliases> + <div> + <div v-if="this.deleted" class="bookmark">Deleted <a :href="bookmark.uri">{{ bookmark.uri }}</a></div> + <div v-else class="bookmark"> + <LinkCount class="screenshot" :bookmarkId="bookmark.id" :link="bookmark.uri"> + <img v-if="bookmark.screenshot" :src="hexaToImg(bookmark.screenshot)" /> + </LinkCount> + <div class="info"> + <div class="info-header"> + <Visit :visit="bookmark.visit"></Visit> + <LinkCount :bookmarkId="bookmark.id" :link="bookmark.uri"> + <img v-if="bookmark.favicon" :src="hexaToImg(bookmark.favicon)" /> + </LinkCount> + <LinkCount class="uri" :bookmarkId="bookmark.id" :link="bookmark.uri"> + {{ bookmark.uri }} + </LinkCount> + <button @click.prevent="edit">Edit</button> + <button @click.prevent="deleteBookmark">Delete</button> + </div> + <!-- <span>{{ bookmark.authenticationinfo }}</span> faire afficher une popup de modification de l'objet auth--> + <Description :description="bookmark.description"></Description> + <div class="info-footer"> + <BookmarkDate :creationDate="date" :updateDate="bookmark.updatedate"></BookmarkDate> + <Tags :tags="bookmark.tags"></Tags> + <!-- <span>{{ bookmark.lang }}</span> --> + <!-- <span>{{ bookmark.owner }}</span> si mon id n'est pas le meme alors c'est le bookmark d'un autre partage par un group --> + <Aliases + :bookmarkId="bookmark.id" + :link="bookmark.uri" + :aliases="bookmark.privatealias" + title="alias privé" + ></Aliases> + <Aliases + :bookmarkId="bookmark.id" + :link="bookmark.uri" + :aliases="bookmark.publicalias" + title="alias public" + ></Aliases> + </div> </div> </div> </div> -</div> </template> <script> @@ -46,6 +58,7 @@ import Visit from '@/components/bookmark/Visit' }) class Bookmark extends Vue { @Prop bookmark + deleted = false get date() { return this.bookmark.importdate || this.bookmark.creationdate @@ -55,6 +68,20 @@ class Bookmark extends Vue { this.$router.push({ name: 'Edit', params: { id: this.bookmark.id } }) } + deleteBookmark() { + if (confirm(`Do you want realy remove this bookmark\n${this.bookmark.uri} ?`)) { + this.$fetch.delete(`/bookmarks/${this.bookmark.id}`).then( + () => { + this.deleted = true + }, + (err) => { + console.log('ko', err) + this.errorMsg = err.cause + } + ) + } + } + hexaToImg(hexa) { if (!hexa.startsWith('\\x')) { return '' @@ -93,15 +120,17 @@ export default Bookmark margin: 2px; } - .info, .uri { + .info, + .uri { flex-grow: 2; } .info { display: flex; flex-direction: column; - - .info-header, .info-footer { + + .info-header, + .info-footer { margin: 2px; display: flex; flex-direction: row; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm