mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-25 13:39:22 +00:00
Compare commits
No commits in common. "4983e18e23b34126e778c2e56e684f9f8d801f2b" and "96835ebd3342a94987adc1c900fc616033b19a2a" have entirely different histories.
4983e18e23
...
96835ebd33
@ -1,13 +1,11 @@
|
||||
# upcoming
|
||||
|
||||
- (new) Fever API support (thanks to @icefed)
|
||||
- (new) editable feed link (thanks to @adaszko)
|
||||
- (fix) duplicate articles caused by the same feed addition (thanks to @adaszko)
|
||||
- (fix) relative article links (thanks to @adazsko for the report)
|
||||
- (fix) atom article links stored in id element (thanks to @adazsko for the report)
|
||||
- (fix) parsing atom feed titles (thanks to @wnh)
|
||||
- (fix) sorting same-day batch articles (thanks to @lamescholar for the report)
|
||||
- (fix) showing login page in the selected theme (thanks to @feddiriko for the report)
|
||||
|
||||
# v2.4 (2023-08-15)
|
||||
|
||||
|
@ -220,10 +220,6 @@
|
||||
<span class="icon mr-1">{% inline "edit.svg" %}</span>
|
||||
Rename
|
||||
</button>
|
||||
<button class="dropdown-item" @click="updateFeedLink(current.feed)" v-if="current.feed.feed_link">
|
||||
<span class="icon mr-1">{% inline "edit.svg" %}</span>
|
||||
Change Link
|
||||
</button>
|
||||
<div class="dropdown-divider"></div>
|
||||
<header class="dropdown-header">Move to...</header>
|
||||
<button class="dropdown-item"
|
||||
@ -342,11 +338,7 @@
|
||||
<div class="content-wrapper">
|
||||
<h1><b>{{ itemSelectedDetails.title || 'untitled' }}</b></h1>
|
||||
<div class="text-muted">
|
||||
<div>
|
||||
<span class="cursor-pointer" @click="feedSelected = 'feed:'+(feedsById[itemSelectedDetails.feed_id] || {}).id">
|
||||
{{ (feedsById[itemSelectedDetails.feed_id] || {}).title }}
|
||||
</span>
|
||||
</div>
|
||||
<div>{{ (feedsById[itemSelectedDetails.feed_id] || {}).title }}</div>
|
||||
<time>{{ formatDate(itemSelectedDetails.date) }}</time>
|
||||
</div>
|
||||
<hr>
|
||||
|
@ -523,14 +523,6 @@ var vm = new Vue({
|
||||
})
|
||||
}
|
||||
},
|
||||
updateFeedLink: function(feed) {
|
||||
var newLink = prompt('Enter feed link', feed.feed_link)
|
||||
if (newLink) {
|
||||
api.feeds.update(feed.id, {feed_link: newLink}).then(function() {
|
||||
feed.feed_link = newLink
|
||||
})
|
||||
}
|
||||
},
|
||||
renameFeed: function(feed) {
|
||||
var newTitle = prompt('Enter new title', feed.title)
|
||||
if (newTitle) {
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="theme-{% .settings.theme_name %}">
|
||||
<body>
|
||||
<form action="" method="post">
|
||||
<img src="./static/graphicarts/anchor.svg" alt="">
|
||||
{% if .error %}
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
|
||||
"github.com/nkanaev/yarr/src/assets"
|
||||
"github.com/nkanaev/yarr/src/server/router"
|
||||
"github.com/nkanaev/yarr/src/storage"
|
||||
)
|
||||
|
||||
type Middleware struct {
|
||||
@ -14,7 +13,6 @@ type Middleware struct {
|
||||
Password string
|
||||
BasePath string
|
||||
Public []string
|
||||
DB *storage.Storage
|
||||
}
|
||||
|
||||
func unsafeMethod(method string) bool {
|
||||
@ -48,15 +46,12 @@ func (m *Middleware) Handler(c *router.Context) {
|
||||
c.Redirect(rootUrl)
|
||||
return
|
||||
} else {
|
||||
c.HTML(http.StatusOK, assets.Template("login.html"), map[string]interface{}{
|
||||
c.HTML(http.StatusOK, assets.Template("login.html"), map[string]string{
|
||||
"username": username,
|
||||
"error": "Invalid username/password",
|
||||
"settings": m.DB.GetSettings(),
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
c.HTML(http.StatusOK, assets.Template("login.html"), map[string]interface{}{
|
||||
"settings": m.DB.GetSettings(),
|
||||
})
|
||||
c.HTML(http.StatusOK, assets.Template("login.html"), nil)
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ func (s *Server) handler() http.Handler {
|
||||
Username: s.Username,
|
||||
Password: s.Password,
|
||||
Public: []string{"/static", "/fever"},
|
||||
DB: s.db,
|
||||
}
|
||||
r.Use(a.Handler)
|
||||
}
|
||||
@ -294,11 +293,6 @@ func (s *Server) handleFeed(c *router.Context) {
|
||||
s.db.UpdateFeedFolder(id, &folderId)
|
||||
}
|
||||
}
|
||||
if link, ok := body["feed_link"]; ok {
|
||||
if reflect.TypeOf(link).Kind() == reflect.String {
|
||||
s.db.UpdateFeedLink(id, link.(string))
|
||||
}
|
||||
}
|
||||
c.Out.WriteHeader(http.StatusOK)
|
||||
} else if c.Req.Method == "DELETE" {
|
||||
s.db.DeleteFeed(id)
|
||||
|
@ -71,11 +71,6 @@ func (s *Storage) UpdateFeedFolder(feedId int64, newFolderId *int64) bool {
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func (s *Storage) UpdateFeedLink(feedId int64, newLink string) bool {
|
||||
_, err := s.db.Exec(`update feeds set feed_link = ? where id = ?`, newLink, feedId)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func (s *Storage) UpdateFeedIcon(feedId int64, icon *[]byte) bool {
|
||||
_, err := s.db.Exec(`update feeds set icon = ? where id = ?`, icon, feedId)
|
||||
return err == nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user