Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
添加屏幕显示
Browse files Browse the repository at this point in the history
  • Loading branch information
roylez committed Aug 24, 2017
1 parent fd21a08 commit b5c2235
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions alfred.rb
Expand Up @@ -65,6 +65,12 @@ def icon text
def attribute(att, value)
attributes[att.to_s] = value
end
def largetype(text)
self << elem_with_text(:text, text, "type" => "largetype")
end
def copy(text)
self << elem_with_text(:text, text, "type" => "copy")
end

private
def elem_with_text(label, text, attrs = {})
Expand Down
4 changes: 3 additions & 1 deletion kuaidi_query.rb
Expand Up @@ -20,7 +20,7 @@ def format_alfred_detail(detail)
attribute :arg, detail[:data].collect{|r| format_status_record(r,nil)}.join(";")
title decode_company( detail[:com]) + ' ' + detail[:nu]
icon 'icon.png'
subtitle 'Shift 显示详情 | Enter 复制到剪切板'
subtitle 'Shift 显示详情 | Enter 复制到剪切板 | ⌘L 屏幕显示'
end

total = detail[:data].size
Expand All @@ -32,6 +32,8 @@ def format_alfred_detail(detail)
subtitle context, "shift"
icon record[:context] =~ /签收/ ? 'success.png' : ( ind.zero? ? 'truck.png' : 'up.png' )
attribute :arg, context
largetype context
copy context
end
end

Expand Down

0 comments on commit b5c2235

Please sign in to comment.