diff --git a/client/model.go b/client/model.go index 4335120c..75822167 100644 --- a/client/model.go +++ b/client/model.go @@ -34,6 +34,7 @@ type User struct { KeyboardShortcuts bool `json:"keyboard_shortcuts"` ShowReadingTime bool `json:"show_reading_time"` EntrySwipe bool `json:"entry_swipe"` + DoubleTap bool `json:"double_tap"` LastLoginAt *time.Time `json:"last_login_at"` DisplayMode string `json:"display_mode"` DefaultReadingSpeed int `json:"default_reading_speed"` @@ -72,6 +73,7 @@ type UserModificationRequest struct { KeyboardShortcuts *bool `json:"keyboard_shortcuts"` ShowReadingTime *bool `json:"show_reading_time"` EntrySwipe *bool `json:"entry_swipe"` + DoubleTap *bool `json:"double_tap"` DisplayMode *string `json:"display_mode"` DefaultReadingSpeed *int `json:"default_reading_speed"` CJKReadingSpeed *int `json:"cjk_reading_speed"` diff --git a/database/migrations.go b/database/migrations.go index 82780125..208c7b57 100644 --- a/database/migrations.go +++ b/database/migrations.go @@ -633,4 +633,9 @@ var migrations = []func(tx *sql.Tx) error{ _, err = tx.Exec(sql) return }, + func(tx *sql.Tx) (err error) { + sql := `ALTER TABLE users ADD COLUMN double_tap boolean default 't'` + _, err = tx.Exec(sql) + return err + }, } diff --git a/locale/translations/de_DE.json b/locale/translations/de_DE.json index d705790a..4bea3fcc 100644 --- a/locale/translations/de_DE.json +++ b/locale/translations/de_DE.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Alphabetisch", "form.prefs.select.unread_count": "Ungelesen zählen", "form.prefs.label.keyboard_shortcuts": "Tastaturkürzel aktivieren", - "form.prefs.label.entry_swipe": "Wischgeste für Einträge auf dem Handy aktivieren", + "form.prefs.label.entry_swipe": "Aktivieren Sie das Streichen von Einträgen auf Touchscreens", + "form.prefs.label.double_tap": "Doppeltippen aktivieren, um zwischen Einträgen zu navigieren", "form.prefs.label.show_reading_time": "Geschätzte Lesezeit für Artikel anzeigen", "form.prefs.label.custom_css": "Benutzerdefiniertes CSS", "form.prefs.label.entry_order": "Eintrag Sortierspalte", diff --git a/locale/translations/el_EL.json b/locale/translations/el_EL.json index 0d299988..d1aa0747 100644 --- a/locale/translations/el_EL.json +++ b/locale/translations/el_EL.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Αλφαβητική σειρά", "form.prefs.select.unread_count": "Αριθμός μη αναγνωσμένων", "form.prefs.label.keyboard_shortcuts": "Ενεργοποίηση συντομεύσεων πληκτρολογίου", - "form.prefs.label.entry_swipe": "Ενεργοποιήστε τη χειρονομία σάρωσης στις καταχωρήσεις στο κινητό", + "form.prefs.label.entry_swipe": "Ενεργοποιήστε το σάρωση καταχώρισης στις οθόνες αφής", + "form.prefs.label.double_tap": "Ενεργοποιήστε το διπλό πάτημα για πλοήγηση μεταξύ των καταχωρήσεων", "form.prefs.label.show_reading_time": "Εμφάνιση εκτιμώμενου χρόνου ανάγνωσης για άρθρα", "form.prefs.label.custom_css": "Προσαρμοσμένο CSS", "form.prefs.label.entry_order": "Στήλη ταξινόμησης εισόδου", diff --git a/locale/translations/en_US.json b/locale/translations/en_US.json index 8e11934d..b797a0d5 100644 --- a/locale/translations/en_US.json +++ b/locale/translations/en_US.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Alphabetical", "form.prefs.select.unread_count": "Unread count", "form.prefs.label.keyboard_shortcuts": "Enable keyboard shortcuts", - "form.prefs.label.entry_swipe": "Enable swipe and double-tap gestures on entries on mobile", + "form.prefs.label.entry_swipe": "Enable entry swipe on touch screens", + "form.prefs.label.double_tap": "Enable double tap to navigate between entries", "form.prefs.label.show_reading_time": "Show estimated reading time for entries", "form.prefs.label.custom_css": "Custom CSS", "form.prefs.label.entry_order": "Entry sorting column", diff --git a/locale/translations/es_ES.json b/locale/translations/es_ES.json index 3010b833..554fbb65 100644 --- a/locale/translations/es_ES.json +++ b/locale/translations/es_ES.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Alfabético", "form.prefs.select.unread_count": "Recuento de no leídos", "form.prefs.label.keyboard_shortcuts": "Habilitar atajos de teclado", - "form.prefs.label.entry_swipe": "Habilitar el gesto de deslizar el dedo en los artículos en el móvil", + "form.prefs.label.entry_swipe": "Habilitar deslizamiento de entrada en pantallas táctiles", + "form.prefs.label.double_tap": "Habilite el doble toque para navegar entre las entradas", "form.prefs.label.show_reading_time": "Mostrar el tiempo estimado de lectura de los artículos", "form.prefs.label.custom_css": "CSS personalizado", "form.prefs.label.entry_order": "Columna de clasificación de artículos", diff --git a/locale/translations/fi_FI.json b/locale/translations/fi_FI.json index 64ff003c..945ae938 100644 --- a/locale/translations/fi_FI.json +++ b/locale/translations/fi_FI.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Aakkosjärjestys", "form.prefs.select.unread_count": "Lukemattomien määrä", "form.prefs.label.keyboard_shortcuts": "Ota pikanäppäimet käyttöön", - "form.prefs.label.entry_swipe": "Ota pyyhkäisyele käyttöön mobiililaitteella", + "form.prefs.label.entry_swipe": "Ota syöttöpyyhkäisy käyttöön kosketusnäytöissä", + "form.prefs.label.double_tap": "Ota kaksoisnapautus käyttöön siirtyäksesi merkintöjen välillä", "form.prefs.label.show_reading_time": "Näytä artikkeleiden arvioitu lukuaika", "form.prefs.label.custom_css": "Mukautettu CSS", "form.prefs.label.entry_order": "Lajittele sarakkeen mukaan", diff --git a/locale/translations/fr_FR.json b/locale/translations/fr_FR.json index a2ee6503..b1a8dbec 100644 --- a/locale/translations/fr_FR.json +++ b/locale/translations/fr_FR.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Alphabétique", "form.prefs.select.unread_count": "Nombre d'articles non lus", "form.prefs.label.keyboard_shortcuts": "Activer les raccourcis clavier", - "form.prefs.label.entry_swipe": "Activer le geste de balayage sur les entrées sur mobile", + "form.prefs.label.entry_swipe": "Activer le balayage des entrées sur les écrans tactiles", + "form.prefs.label.double_tap": "Activer le double tap pour naviguer entre les entrées", "form.prefs.label.show_reading_time": "Afficher le temps de lecture estimé des articles", "form.prefs.label.custom_css": "CSS personnalisé", "form.prefs.label.entry_order": "Colonne de tri des entrées", diff --git a/locale/translations/hi_IN.json b/locale/translations/hi_IN.json index 798b9244..a9249f6a 100644 --- a/locale/translations/hi_IN.json +++ b/locale/translations/hi_IN.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "वर्णक्रम", "form.prefs.select.unread_count": "अपठित गणना", "form.prefs.label.keyboard_shortcuts": "कीबोर्ड शॉर्टकट सक्षम करें", - "form.prefs.label.entry_swipe": "मोबाइल पर प्रविष्टियों पर स्वाइप जेस्चर सक्षम करें", + "form.prefs.label.entry_swipe": "टच स्क्रीन पर एंट्री स्वाइप सक्षम करें", + "form.prefs.label.double_tap": "प्रविष्टियों के बीच नेविगेट करने के लिए डबल टैप सक्षम करें", "form.prefs.label.show_reading_time": "विषय के लिए अनुमानित पढ़ने का समय दिखाएं", "form.prefs.label.custom_css": "कस्टम सीएसएस", "form.prefs.label.entry_order": "प्रवेश छँटाई कॉलम", diff --git a/locale/translations/it_IT.json b/locale/translations/it_IT.json index 1827ce7c..26aad01f 100644 --- a/locale/translations/it_IT.json +++ b/locale/translations/it_IT.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "In ordine alfabetico", "form.prefs.select.unread_count": "Conteggio dei non letti", "form.prefs.label.keyboard_shortcuts": "Abilita le scorciatoie da tastiera", - "form.prefs.label.entry_swipe": "Abilita il gesto di scorrimento sulle voci sul cellulare", + "form.prefs.label.entry_swipe": "Abilita lo scorrimento della voce sui touch screen", + "form.prefs.label.double_tap": "Abilita il doppio tocco per navigare tra le voci", "form.prefs.label.show_reading_time": "Mostra il tempo di lettura stimato per gli articoli", "form.prefs.label.custom_css": "CSS personalizzati", "form.prefs.label.entry_order": "Colonna di ordinamento delle voci", diff --git a/locale/translations/ja_JP.json b/locale/translations/ja_JP.json index f4b4aaa5..d1a85bfb 100644 --- a/locale/translations/ja_JP.json +++ b/locale/translations/ja_JP.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "アルファベット順", "form.prefs.select.unread_count": "未読数", "form.prefs.label.keyboard_shortcuts": "キーボード・ショートカットを有効にする", - "form.prefs.label.entry_swipe": "モバイルのエントリでスワイプジェスチャーを有効にする", + "form.prefs.label.entry_swipe": "タッチ スクリーンで入力スワイプを有効にする", + "form.prefs.label.double_tap": "ダブルタップを有効にしてエントリ間を移動", "form.prefs.label.show_reading_time": "記事の推定読書時間を表示する", "form.prefs.label.custom_css": "カスタムCSS", "form.prefs.label.entry_order": "エントリーソートカラム", diff --git a/locale/translations/nl_NL.json b/locale/translations/nl_NL.json index 615194f1..5d4879d9 100644 --- a/locale/translations/nl_NL.json +++ b/locale/translations/nl_NL.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Alfabetisch", "form.prefs.select.unread_count": "Ongelezen tellen", "form.prefs.label.keyboard_shortcuts": "Schakel sneltoetsen in", - "form.prefs.label.entry_swipe": "Schakel veegbewegingen in voor items op mobiel", + "form.prefs.label.entry_swipe": "Invoervegen inschakelen op aanraakschermen", + "form.prefs.label.double_tap": "Schakel dubbeltikken in om tussen vermeldingen te navigeren", "form.prefs.label.show_reading_time": "Toon geschatte leestijd voor artikelen", "form.prefs.label.custom_css": "Aangepaste CSS", "form.prefs.label.entry_order": "Ingang Sorteerkolom", diff --git a/locale/translations/pl_PL.json b/locale/translations/pl_PL.json index 8a929334..49dffe9f 100644 --- a/locale/translations/pl_PL.json +++ b/locale/translations/pl_PL.json @@ -301,7 +301,8 @@ "form.prefs.label.display_mode": "Tryb wyświetlania aplikacji internetowej (wymaga ponownej instalacji)", "form.prefs.select.older_first": "Najstarsze wpisy jako pierwsze", "form.prefs.label.keyboard_shortcuts": "Włącz skróty klawiaturowe", - "form.prefs.label.entry_swipe": "Włącz gest przesuwania na wpisach na telefonie komórkowym", + "form.prefs.label.entry_swipe": "Włącz machnięcie wpisu na ekranach dotykowych", + "form.prefs.label.double_tap": "Włącz podwójne dotknięcie, aby przechodzić między wpisami", "form.prefs.label.show_reading_time": "Pokaż szacowany czas czytania artykułów", "form.prefs.select.recent_first": "Najnowsze wpisy jako pierwsze", "form.prefs.select.fullscreen": "Pełny ekran", diff --git a/locale/translations/pt_BR.json b/locale/translations/pt_BR.json index 6f02168b..3c00cce3 100644 --- a/locale/translations/pt_BR.json +++ b/locale/translations/pt_BR.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Por ordem alfabética", "form.prefs.select.unread_count": "Contagem não lida", "form.prefs.label.keyboard_shortcuts": "Habilitar atalhos do teclado", - "form.prefs.label.entry_swipe": "Ativar gesto de deslizar nas entradas no celular", + "form.prefs.label.entry_swipe": "Ativar entrada de furto em telas sensíveis ao toque", + "form.prefs.label.double_tap": "Ative o toque duplo para navegar entre as entradas", "form.prefs.label.show_reading_time": "Mostrar tempo estimado de leitura de artigos", "form.prefs.label.custom_css": "CSS customizado", "form.prefs.label.entry_order": "Coluna de Ordenação de Entrada", diff --git a/locale/translations/ru_RU.json b/locale/translations/ru_RU.json index 3f1bcccf..7d692aaa 100644 --- a/locale/translations/ru_RU.json +++ b/locale/translations/ru_RU.json @@ -310,7 +310,8 @@ "form.prefs.select.alphabetical": "По алфавиту", "form.prefs.select.unread_count": "Количество непрочитанных", "form.prefs.label.keyboard_shortcuts": "Включить сочетания клавиш", - "form.prefs.label.entry_swipe": "Включить жест смахивания для записей на мобильном устройстве", + "form.prefs.label.entry_swipe": "Включить пролистывание ввода на сенсорных экранах", + "form.prefs.label.double_tap": "Включить двойное касание для перехода между записями", "form.prefs.label.show_reading_time": "Показать примерное время чтения статей", "form.prefs.label.custom_css": "Пользовательские CSS", "form.prefs.label.entry_order": "Колонка сортировки ввода", diff --git a/locale/translations/tr_TR.json b/locale/translations/tr_TR.json index 41b30fcc..11cf8bbe 100644 --- a/locale/translations/tr_TR.json +++ b/locale/translations/tr_TR.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "Alfabetik", "form.prefs.select.unread_count": "Okunmamış sayısı", "form.prefs.label.keyboard_shortcuts": "Klavye kısayollarını etkinleştir", - "form.prefs.label.entry_swipe": "Mobil cihazlarda iletiler için kaydırma hareketlerini etkinleştir", + "form.prefs.label.entry_swipe": "Увімкніть введення пальцем на сенсорних екранах", + "form.prefs.label.double_tap": "Girişler arasında gezinmek için çift dokunmayı etkinleştirin", "form.prefs.label.show_reading_time": "Makaleler için tahmini okuma süresini göster", "form.prefs.label.custom_css": "Özel CSS", "form.prefs.label.entry_order": "Giriş Sıralama Sütunu", diff --git a/locale/translations/uk_UA.json b/locale/translations/uk_UA.json index 910ab10f..0e0015a3 100644 --- a/locale/translations/uk_UA.json +++ b/locale/translations/uk_UA.json @@ -307,12 +307,13 @@ "form.prefs.select.alphabetical": "За алфавітом", "form.prefs.select.unread_count": "Кількість непрочитаних", "form.prefs.label.keyboard_shortcuts": "Увімкнути комбінації клавиш", - "form.prefs.label.entry_swipe": "Увімкнути жест гортання для записів на мобільних пристроях", + "form.prefs.label.entry_swipe": "Увімкніть введення пальцем на сенсорних екранах", + "form.prefs.label.double_tap": "Увімкніть подвійне торкання, щоб переходити між записами", "form.prefs.label.show_reading_time": "Показувати приблизний час читання для записів", "form.prefs.label.custom_css": "Спеціальний CSS", "form.prefs.label.entry_order": "Стовпець сортування записів", "form.prefs.label.default_home_page": "Домашня сторінка за умовчанням", - "form.prefs.label.categories_sorting_order": "Сортування за категоріями", + "form.prefs.label.categories_sorting_order": "Сортування за категоріями", "form.import.label.file": "Файл OPML", "form.import.label.url": "URL-адреса", "form.integration.fever_activate": "Увімкнути API Fever", diff --git a/locale/translations/zh_CN.json b/locale/translations/zh_CN.json index 93ea49f0..f3aa8db7 100644 --- a/locale/translations/zh_CN.json +++ b/locale/translations/zh_CN.json @@ -306,7 +306,8 @@ "form.prefs.select.alphabetical": "按字母顺序", "form.prefs.select.unread_count": "未读计数", "form.prefs.label.keyboard_shortcuts": "启用键盘快捷键", - "form.prefs.label.entry_swipe": "在移动设备上启用滑动手势", + "form.prefs.label.entry_swipe": "在触摸屏上启用输入滑动", + "form.prefs.label.double_tap": "启用双击以在条目之间导航", "form.prefs.label.show_reading_time": "显示文章的预计阅读时间", "form.prefs.label.custom_css": "自定义 CSS", "form.prefs.label.entry_order": "文章排序依据", diff --git a/locale/translations/zh_TW.json b/locale/translations/zh_TW.json index dcc22107..4cfa1e68 100644 --- a/locale/translations/zh_TW.json +++ b/locale/translations/zh_TW.json @@ -308,7 +308,8 @@ "form.prefs.select.alphabetical": "按字母順序", "form.prefs.select.unread_count": "未讀計數", "form.prefs.label.keyboard_shortcuts": "啟用鍵盤快捷鍵", - "form.prefs.label.entry_swipe": "在移動裝置上啟用滑動手勢", + "form.prefs.label.entry_swipe": "在触摸屏上启用输入滑动", + "form.prefs.label.double_tap": "啟用雙擊以在條目之間導航", "form.prefs.label.show_reading_time": "顯示文章的預計閱讀時間", "form.prefs.label.custom_css": "自定義 CSS", "form.prefs.label.entry_order": "文章排序依據", diff --git a/model/user.go b/model/user.go index 341d28dc..08608900 100644 --- a/model/user.go +++ b/model/user.go @@ -28,6 +28,7 @@ type User struct { KeyboardShortcuts bool `json:"keyboard_shortcuts"` ShowReadingTime bool `json:"show_reading_time"` EntrySwipe bool `json:"entry_swipe"` + DoubleTap bool `json:"double_tap"` LastLoginAt *time.Time `json:"last_login_at"` DisplayMode string `json:"display_mode"` DefaultReadingSpeed int `json:"default_reading_speed"` @@ -62,6 +63,7 @@ type UserModificationRequest struct { KeyboardShortcuts *bool `json:"keyboard_shortcuts"` ShowReadingTime *bool `json:"show_reading_time"` EntrySwipe *bool `json:"entry_swipe"` + DoubleTap *bool `json:"double_tap"` DisplayMode *string `json:"display_mode"` DefaultReadingSpeed *int `json:"default_reading_speed"` CJKReadingSpeed *int `json:"cjk_reading_speed"` @@ -131,6 +133,10 @@ func (u *UserModificationRequest) Patch(user *User) { user.EntrySwipe = *u.EntrySwipe } + if u.DoubleTap != nil { + user.DoubleTap = *u.DoubleTap + } + if u.DisplayMode != nil { user.DisplayMode = *u.DisplayMode } diff --git a/storage/user.go b/storage/user.go index 15b706ff..9f5a2768 100644 --- a/storage/user.go +++ b/storage/user.go @@ -81,6 +81,7 @@ func (s *Storage) CreateUser(userCreationRequest *model.UserCreationRequest) (*m keyboard_shortcuts, show_reading_time, entry_swipe, + double_tap, stylesheet, google_id, openid_connect_id, @@ -117,6 +118,7 @@ func (s *Storage) CreateUser(userCreationRequest *model.UserCreationRequest) (*m &user.KeyboardShortcuts, &user.ShowReadingTime, &user.EntrySwipe, + &user.DoubleTap, &user.Stylesheet, &user.GoogleID, &user.OpenIDConnectID, @@ -172,17 +174,18 @@ func (s *Storage) UpdateUser(user *model.User) error { keyboard_shortcuts=$9, show_reading_time=$10, entry_swipe=$11, - stylesheet=$12, - google_id=$13, - openid_connect_id=$14, - display_mode=$15, - entry_order=$16, - default_reading_speed=$17, - cjk_reading_speed=$18, - default_home_page=$19, - categories_sorting_order=$20 + double_tap=$12, + stylesheet=$13, + google_id=$14, + openid_connect_id=$15, + display_mode=$16, + entry_order=$17, + default_reading_speed=$18, + cjk_reading_speed=$19, + default_home_page=$20, + categories_sorting_order=$21 WHERE - id=$21 + id=$22 ` _, err = s.db.Exec( @@ -198,6 +201,7 @@ func (s *Storage) UpdateUser(user *model.User) error { user.KeyboardShortcuts, user.ShowReadingTime, user.EntrySwipe, + user.DoubleTap, user.Stylesheet, user.GoogleID, user.OpenIDConnectID, @@ -225,17 +229,18 @@ func (s *Storage) UpdateUser(user *model.User) error { keyboard_shortcuts=$8, show_reading_time=$9, entry_swipe=$10, - stylesheet=$11, - google_id=$12, - openid_connect_id=$13, - display_mode=$14, - entry_order=$15, - default_reading_speed=$16, - cjk_reading_speed=$17, - default_home_page=$18, - categories_sorting_order=$19 + double_tap=$11, + stylesheet=$12, + google_id=$13, + openid_connect_id=$14, + display_mode=$15, + entry_order=$16, + default_reading_speed=$17, + cjk_reading_speed=$18, + default_home_page=$19, + categories_sorting_order=$20 WHERE - id=$20 + id=$21 ` _, err := s.db.Exec( @@ -250,6 +255,7 @@ func (s *Storage) UpdateUser(user *model.User) error { user.KeyboardShortcuts, user.ShowReadingTime, user.EntrySwipe, + user.DoubleTap, user.Stylesheet, user.GoogleID, user.OpenIDConnectID, @@ -295,6 +301,7 @@ func (s *Storage) UserByID(userID int64) (*model.User, error) { keyboard_shortcuts, show_reading_time, entry_swipe, + double_tap, last_login_at, stylesheet, google_id, @@ -328,6 +335,7 @@ func (s *Storage) UserByUsername(username string) (*model.User, error) { keyboard_shortcuts, show_reading_time, entry_swipe, + double_tap, last_login_at, stylesheet, google_id, @@ -361,6 +369,7 @@ func (s *Storage) UserByField(field, value string) (*model.User, error) { keyboard_shortcuts, show_reading_time, entry_swipe, + double_tap, last_login_at, stylesheet, google_id, @@ -401,6 +410,7 @@ func (s *Storage) UserByAPIKey(token string) (*model.User, error) { u.keyboard_shortcuts, u.show_reading_time, u.entry_swipe, + u.double_tap, u.last_login_at, u.stylesheet, u.google_id, @@ -435,6 +445,7 @@ func (s *Storage) fetchUser(query string, args ...interface{}) (*model.User, err &user.KeyboardShortcuts, &user.ShowReadingTime, &user.EntrySwipe, + &user.DoubleTap, &user.LastLoginAt, &user.Stylesheet, &user.GoogleID, @@ -531,6 +542,7 @@ func (s *Storage) Users() (model.Users, error) { keyboard_shortcuts, show_reading_time, entry_swipe, + double_tap, last_login_at, stylesheet, google_id, @@ -566,6 +578,7 @@ func (s *Storage) Users() (model.Users, error) { &user.KeyboardShortcuts, &user.ShowReadingTime, &user.EntrySwipe, + &user.DoubleTap, &user.LastLoginAt, &user.Stylesheet, &user.GoogleID, diff --git a/template/templates/views/bookmark_entries.html b/template/templates/views/bookmark_entries.html index 0265615d..ba74fcd0 100644 --- a/template/templates/views/bookmark_entries.html +++ b/template/templates/views/bookmark_entries.html @@ -13,7 +13,7 @@
{{ range .entries }} -
+
{{ if ne .Feed.Icon.IconID 0 }} diff --git a/template/templates/views/category_entries.html b/template/templates/views/category_entries.html index b221370b..0ea076ea 100644 --- a/template/templates/views/category_entries.html +++ b/template/templates/views/category_entries.html @@ -50,7 +50,7 @@
{{ range .entries }} -
+
{{ if ne .Feed.Icon.IconID 0 }} diff --git a/template/templates/views/entry.html b/template/templates/views/entry.html index 3d579d14..150041c7 100644 --- a/template/templates/views/entry.html +++ b/template/templates/views/entry.html @@ -143,7 +143,7 @@
{{ end }} {{ end }} -
+
{{ if .user }} {{ noescape (proxyFilter .entry.Content) }} {{ else }} diff --git a/template/templates/views/feed_entries.html b/template/templates/views/feed_entries.html index 7a900b4e..bf08212d 100644 --- a/template/templates/views/feed_entries.html +++ b/template/templates/views/feed_entries.html @@ -75,7 +75,7 @@
{{ range .entries }} -
+
{{ if ne .Feed.Icon.IconID 0 }} diff --git a/template/templates/views/history_entries.html b/template/templates/views/history_entries.html index 59ab921c..64c7d122 100644 --- a/template/templates/views/history_entries.html +++ b/template/templates/views/history_entries.html @@ -29,7 +29,7 @@
{{ range .entries }} -
+
{{ if ne .Feed.Icon.IconID 0 }} diff --git a/template/templates/views/search_entries.html b/template/templates/views/search_entries.html index b5e23d66..8fe4dc54 100644 --- a/template/templates/views/search_entries.html +++ b/template/templates/views/search_entries.html @@ -13,7 +13,7 @@
{{ range .entries }} -
+
{{ if ne .Feed.Icon.IconID 0 }} diff --git a/template/templates/views/settings.html b/template/templates/views/settings.html index 3afe2675..8a33b0dd 100644 --- a/template/templates/views/settings.html +++ b/template/templates/views/settings.html @@ -88,10 +88,12 @@ - - + + + + diff --git a/template/templates/views/shared_entries.html b/template/templates/views/shared_entries.html index 70757a94..b33925a0 100644 --- a/template/templates/views/shared_entries.html +++ b/template/templates/views/shared_entries.html @@ -26,7 +26,7 @@ {{ else }}
{{ range .entries }} -
+
{{ if ne .Feed.Icon.IconID 0 }} diff --git a/template/templates/views/unread_entries.html b/template/templates/views/unread_entries.html index 8805340d..e6cc28bf 100644 --- a/template/templates/views/unread_entries.html +++ b/template/templates/views/unread_entries.html @@ -36,7 +36,7 @@
{{ range .entries }} -
+
{{ if ne .Feed.Icon.IconID 0 }} diff --git a/ui/form/settings.go b/ui/form/settings.go index 20382d28..ef508743 100644 --- a/ui/form/settings.go +++ b/ui/form/settings.go @@ -27,6 +27,7 @@ type SettingsForm struct { ShowReadingTime bool CustomCSS string EntrySwipe bool + DoubleTap bool DisplayMode string DefaultReadingSpeed int CJKReadingSpeed int @@ -47,6 +48,7 @@ func (s *SettingsForm) Merge(user *model.User) *model.User { user.ShowReadingTime = s.ShowReadingTime user.Stylesheet = s.CustomCSS user.EntrySwipe = s.EntrySwipe + user.DoubleTap = s.DoubleTap user.DisplayMode = s.DisplayMode user.CJKReadingSpeed = s.CJKReadingSpeed user.DefaultReadingSpeed = s.DefaultReadingSpeed @@ -112,6 +114,7 @@ func NewSettingsForm(r *http.Request) *SettingsForm { ShowReadingTime: r.FormValue("show_reading_time") == "1", CustomCSS: r.FormValue("custom_css"), EntrySwipe: r.FormValue("entry_swipe") == "1", + DoubleTap: r.FormValue("double_tap") == "1", DisplayMode: r.FormValue("display_mode"), DefaultReadingSpeed: int(defaultReadingSpeed), CJKReadingSpeed: int(cjkReadingSpeed), diff --git a/ui/settings_show.go b/ui/settings_show.go index bfab21b5..fa2e1480 100644 --- a/ui/settings_show.go +++ b/ui/settings_show.go @@ -38,6 +38,7 @@ func (h *handler) showSettingsPage(w http.ResponseWriter, r *http.Request) { ShowReadingTime: user.ShowReadingTime, CustomCSS: user.Stylesheet, EntrySwipe: user.EntrySwipe, + DoubleTap: user.DoubleTap, DisplayMode: user.DisplayMode, DefaultReadingSpeed: user.DefaultReadingSpeed, CJKReadingSpeed: user.CJKReadingSpeed, diff --git a/ui/static/css/common.css b/ui/static/css/common.css index 37d405a3..1f28df32 100644 --- a/ui/static/css/common.css +++ b/ui/static/css/common.css @@ -760,7 +760,7 @@ template { display: none; } -.touch-item { +.entry-swipe { transition-property: transform; transition-duration: 0s; transition-timing-function: ease-out; diff --git a/ui/static/js/touch_handler.js b/ui/static/js/touch_handler.js index d850f19e..e06d81aa 100644 --- a/ui/static/js/touch_handler.js +++ b/ui/static/js/touch_handler.js @@ -26,11 +26,11 @@ class TouchHandler { } findElement(element) { - if (element.classList.contains("touch-item")) { + if (element.classList.contains("entry-swipe")) { return element; } - return DomHelper.findParent(element, "touch-item"); + return DomHelper.findParent(element, "entry-swipe"); } onTouchStart(event) { @@ -93,7 +93,7 @@ class TouchHandler { } listen() { - let elements = document.querySelectorAll(".touch-item"); + let elements = document.querySelectorAll(".entry-swipe"); let hasPassiveOption = DomHelper.hasPassiveEventListenerOption(); elements.forEach((element) => {