فهرست منبع

Add option to enable or disable double tap

Frédéric Guillot 3 سال پیش
والد
کامیت
2e047dff98

+ 2 - 0
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"`

+ 5 - 0
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
+	},
 }

+ 2 - 1
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",

+ 2 - 1
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": "Στήλη ταξινόμησης εισόδου",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
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": "प्रवेश छँटाई कॉलम",

+ 2 - 1
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",

+ 2 - 1
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": "エントリーソートカラム",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
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": "Колонка сортировки ввода",

+ 2 - 1
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",

+ 3 - 2
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",

+ 2 - 1
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": "文章排序依据",

+ 2 - 1
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": "文章排序依據",

+ 6 - 0
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
 	}

+ 33 - 20
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,

+ 1 - 1
template/templates/views/bookmark_entries.html

@@ -13,7 +13,7 @@
     </div>
     <div class="items">
         {{ range .entries }}
-        <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
+        <article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
             <div class="item-header" dir="auto">
                 <span class="item-title">
                     {{ if ne .Feed.Icon.IconID 0 }}

+ 1 - 1
template/templates/views/category_entries.html

@@ -50,7 +50,7 @@
     </div>
     <div class="items">
         {{ range .entries }}
-        <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
+        <article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
             <div class="item-header" dir="auto">
                 <span class="item-title">
                     {{ if ne .Feed.Icon.IconID 0 }}

+ 1 - 1
template/templates/views/entry.html

@@ -143,7 +143,7 @@
     </div>
     {{ end }}
     {{ end }}
-    <article role="article" class="entry-content {{ if $.user.EntrySwipe }}double-tap{{ end }}" dir="auto">
+    <article role="article" class="entry-content {{ if $.user.DoubleTap }}double-tap{{ end }}" dir="auto">
         {{ if .user }}
             {{ noescape (proxyFilter .entry.Content) }}
         {{ else }}

+ 1 - 1
template/templates/views/feed_entries.html

@@ -75,7 +75,7 @@
     </div>
     <div class="items">
         {{ range .entries }}
-        <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
+        <article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
             <div class="item-header" dir="auto">
                 <span class="item-title">
                     {{ if ne .Feed.Icon.IconID 0 }}

+ 1 - 1
template/templates/views/history_entries.html

@@ -29,7 +29,7 @@
     </div>
     <div class="items">
         {{ range .entries }}
-        <article class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
+        <article class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
             <div class="item-header" dir="auto">
                 <span class="item-title">
                     {{ if ne .Feed.Icon.IconID 0 }}

+ 1 - 1
template/templates/views/search_entries.html

@@ -13,7 +13,7 @@
     </div>
     <div class="items">
         {{ range .entries }}
-        <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
+        <article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
             <div class="item-header" dir="auto">
                 <span class="item-title">
                     {{ if ne .Feed.Icon.IconID 0 }}

+ 4 - 2
template/templates/views/settings.html

@@ -88,10 +88,12 @@
 
     <label><input type="checkbox" name="keyboard_shortcuts" value="1" {{ if .form.KeyboardShortcuts }}checked{{ end }}> {{ t "form.prefs.label.keyboard_shortcuts" }}</label>
 
-    <label><input type="checkbox" name="show_reading_time" value="1" {{ if .form.ShowReadingTime }}checked{{ end }}> {{ t "form.prefs.label.show_reading_time" }}</label>
-
     <label><input type="checkbox" name="entry_swipe" value="1" {{ if .form.EntrySwipe }}checked{{ end }}> {{ t "form.prefs.label.entry_swipe" }}</label>
 
+    <label><input type="checkbox" name="double_tap" value="1" {{ if .form.DoubleTap }}checked{{ end }}> {{ t "form.prefs.label.double_tap" }}</label>
+
+    <label><input type="checkbox" name="show_reading_time" value="1" {{ if .form.ShowReadingTime }}checked{{ end }}> {{ t "form.prefs.label.show_reading_time" }}</label>
+
     <label for="form-cjk-reading-speed">{{ t "form.prefs.label.cjk_reading_speed" }}</label>
     <input type="number" name="cjk_reading_speed" id="form-cjk-reading-speed" value="{{ .form.CJKReadingSpeed }}" min="1">
 

+ 1 - 1
template/templates/views/shared_entries.html

@@ -26,7 +26,7 @@
 {{ else }}
     <div class="items">
         {{ range .entries }}
-        <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
+        <article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
             <div class="item-header" dir="auto">
                 <span class="item-title">
                     {{ if ne .Feed.Icon.IconID 0 }}

+ 1 - 1
template/templates/views/unread_entries.html

@@ -36,7 +36,7 @@
     </div>
     <div class="items hide-read-items">
         {{ range .entries }}
-        <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
+        <article role="article" class="item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
             <div class="item-header" dir="auto">
                 <span class="item-title">
                     {{ if ne .Feed.Icon.IconID 0 }}

+ 3 - 0
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),

+ 1 - 0
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,

+ 1 - 1
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;

+ 3 - 3
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) => {