Skip to content

Commit

Permalink
🧪 Demos (#31)
Browse files Browse the repository at this point in the history
- New fields on VCLSubscriber
- Reorganization of deployment directories
- Icons appearance
  • Loading branch information
p-samuel committed Jan 10, 2023
2 parents 673a410 + a315b07 commit b39b8f8
Show file tree
Hide file tree
Showing 20 changed files with 124 additions and 77 deletions.
4 changes: 2 additions & 2 deletions sample/console/publisher/ConsolePublisher.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DcuOutput>.\lib</DCC_DcuOutput>
<DCC_ExeOutput>.\bin</DCC_ExeOutput>
<DCC_DcuOutput>..\..\..\lib</DCC_DcuOutput>
<DCC_ExeOutput>..\..\..\bin</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
Expand Down
4 changes: 2 additions & 2 deletions sample/console/subscriber/ConsoleSubscriber.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DcuOutput>.\lib</DCC_DcuOutput>
<DCC_ExeOutput>.\bin</DCC_ExeOutput>
<DCC_DcuOutput>..\..\..\lib</DCC_DcuOutput>
<DCC_ExeOutput>..\..\..\bin</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
Expand Down
File renamed without changes.
File renamed without changes.
Binary file added sample/vcl/publisher/Ntfy-54x.ico
Binary file not shown.
16 changes: 12 additions & 4 deletions sample/vcl/publisher/VCLPublisher.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DcuOutput>.\lib</DCC_DcuOutput>
<DCC_ExeOutput>.\bin</DCC_ExeOutput>
<DCC_DcuOutput>..\..\..\lib</DCC_DcuOutput>
<DCC_ExeOutput>..\..\..\bin</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
Expand All @@ -68,9 +68,10 @@
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<Icon_MainIcon>VCLPublisher_Icon.ico</Icon_MainIcon>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<UWP_DelphiLogo44>C:\Users\PRG1\Pictures\Ntfy.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>C:\Users\PRG1\Pictures\Ntfy.png</UWP_DelphiLogo150>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;bindcompvclsmp;tethering;bindcompvclwinx;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;vcledge;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
Expand Down Expand Up @@ -133,6 +134,13 @@
</Source>
</Delphi.Personality>
<Deployment Version="3">
<DeployFile LocalName="C:\Users\PRG1\Pictures\Ntfy.png" Configuration="Debug" Class="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets\</RemoteDir>
<RemoteName>Logo44x44.png</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="bin\VCLPublisher.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>VCLPublisher.exe</RemoteName>
Expand Down
Binary file modified sample/vcl/publisher/VCLPublisher.res
Binary file not shown.
Binary file added sample/vcl/publisher/VCLPublisher_Icon.ico
Binary file not shown.
Binary file removed sample/vcl/publisher/assets/ntfy.png
Binary file not shown.
2 changes: 1 addition & 1 deletion sample/vcl/publisher/src/View.Main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ object ViewMain: TViewMain
EditLabel.Height = 13
EditLabel.Caption = 'Username'
TabOrder = 12
TextHint = 'Only for protected topics/servers'
TextHint = '(optional)'
end
object LbePassword: TLabeledEdit
Left = 364
Expand Down
Binary file added sample/vcl/subscriber/Ntfy-54x.ico
Binary file not shown.
16 changes: 14 additions & 2 deletions sample/vcl/subscriber/VCLSubscriber.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<Icon_MainIcon>Ntfy-54x.ico</Icon_MainIcon>
<UWP_DelphiLogo44>C:\Users\PRG1\Pictures\Ntfy.png</UWP_DelphiLogo44>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<UWP_DelphiLogo150>C:\Users\PRG1\Pictures\Ntfy.png</UWP_DelphiLogo150>
<DCC_ExeOutput>..\..\..\bin</DCC_ExeOutput>
<DCC_DcuOutput>..\..\..\lib</DCC_DcuOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;bindcompvclsmp;tethering;bindcompvclwinx;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;vcledge;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
Expand All @@ -88,6 +91,8 @@
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<UWP_DelphiLogo44>C:\Users\PRG1\Pictures\Ntfy.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>C:\Users\PRG1\Pictures\Ntfy.png</UWP_DelphiLogo150>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
Expand Down Expand Up @@ -140,6 +145,13 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\PRG1\Pictures\Ntfy.png" Configuration="Debug" Class="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets\</RemoteDir>
<RemoteName>Logo44x44.png</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
Expand Down
Binary file modified sample/vcl/subscriber/VCLSubscriber.res
Binary file not shown.
2 changes: 1 addition & 1 deletion sample/vcl/subscriber/src/Example.Push.Notifications.pas
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ implementation
try
LNotification := LNotificationCenter.CreateNotification();
try
LNotification.Name := 'Ntfy';
LNotification.Name := AEvent.Id;
LNotification.Title := AEvent.Title;
LNotification.AlertBody := AEvent.MessageContent;
LNotificationCenter.PresentNotification(LNotification);
Expand Down
116 changes: 75 additions & 41 deletions sample/vcl/subscriber/src/View.Main.dfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object ViewMain: TViewMain
Left = 960
Top = 256
Caption = 'Subscriber'
Caption = 'Ntfy Subscriber'
ClientHeight = 527
ClientWidth = 724
Color = clBtnFace
Expand All @@ -18,11 +18,11 @@ object ViewMain: TViewMain
PixelsPerInch = 96
TextHeight = 13
object lblTopic: TLabel
Left = 271
Top = 17
Width = 164
Left = 445
Top = 13
Width = 260
Height = 13
Caption = 'Topics - for each topic break a line'
Caption = 'Topics - Break a line for each. Don'#39't leave empty lines.'
end
object BtnSubscribe: TButton
Left = 16
Expand Down Expand Up @@ -61,19 +61,36 @@ object ViewMain: TViewMain
item
Expanded = False
FieldName = 'ID'
Width = 67
Width = 50
Visible = True
end
item
Expanded = False
FieldName = 'TIME'
Width = 118
Visible = True
end
item
Expanded = False
FieldName = 'PRIORITY'
Visible = True
end
item
Expanded = False
FieldName = 'TITLE'
Width = 140
Width = 146
Visible = True
end
item
Expanded = False
FieldName = 'MSG'
Width = 318
Width = 700
Visible = True
end
item
Expanded = False
FieldName = 'TOPIC'
Width = 300
Visible = True
end>
end
Expand All @@ -88,7 +105,7 @@ object ViewMain: TViewMain
object GbSince: TRadioGroup
Left = 16
Top = 17
Width = 249
Width = 89
Height = 71
Caption = 'Since'
Enabled = False
Expand All @@ -105,15 +122,15 @@ object ViewMain: TViewMain
Top = 155
Width = 132
Height = 17
Caption = 'Fectch only scheduled'
Caption = 'Fectch scheduled only'
TabOrder = 5
end
object CkSince: TCheckBox
Left = 16
Top = 173
Width = 132
Height = 17
Caption = 'Fetch Cached Messages'
Caption = 'Fetch cached messages'
TabOrder = 6
OnClick = CkSinceClick
end
Expand Down Expand Up @@ -170,15 +187,15 @@ object ViewMain: TViewMain
Width = 104
Height = 21
Style = csDropDownList
ItemIndex = 5
ItemIndex = 0
TabOrder = 3
Items.Strings = (
''
'Min'
'Low'
'Default'
'High'
'Maximum'
'')
'Maximum')
end
object lbeFilterTags: TLabeledEdit
Left = 15
Expand All @@ -192,30 +209,13 @@ object ViewMain: TViewMain
TextHint = 'Tags'
end
end
object DtSince: TDateTimePicker
Left = 114
Top = 59
Width = 137
Height = 21
Date = 44911.000000000000000000
Time = 0.858430219908768800
TabOrder = 8
end
object EdtSince: TEdit
Left = 114
Top = 32
Width = 137
Height = 21
TabOrder = 9
TextHint = 'Message id or Unix time'
end
object BtnClearTable: TButton
Left = 680
Top = 63
Top = 107
Width = 25
Height = 25
Caption = #9851
TabOrder = 10
TabOrder = 8
OnClick = BtnClearTableClick
end
object LbeBaseURL: TLabeledEdit
Expand All @@ -226,28 +226,28 @@ object ViewMain: TViewMain
EditLabel.Width = 45
EditLabel.Height = 13
EditLabel.Caption = 'Base URL'
TabOrder = 11
TabOrder = 9
Text = 'https://ntfy.sh'
TextHint = 'Tags'
end
object MemTopics: TMemo
Left = 271
Top = 36
Left = 462
Top = 32
Width = 243
Height = 52
BorderStyle = bsNone
Lines.Strings = (
'your-very-secret-topic'
'notify-delphi-integration-8jh27d')
TabOrder = 12
TabOrder = 10
end
object BtnHide: TButton
Left = 16
Top = 489
Width = 132
Height = 25
Caption = 'Hide'
TabOrder = 13
TabOrder = 11
OnClick = BtnHideClick
end
object LbeUsername: TLabeledEdit
Expand All @@ -258,7 +258,7 @@ object ViewMain: TViewMain
EditLabel.Width = 48
EditLabel.Height = 13
EditLabel.Caption = 'Username'
TabOrder = 14
TabOrder = 12
TextHint = '(optional)'
end
object LbePassword: TLabeledEdit
Expand All @@ -270,9 +270,26 @@ object ViewMain: TViewMain
EditLabel.Height = 13
EditLabel.Caption = 'Password'
PasswordChar = '*'
TabOrder = 15
TabOrder = 13
TextHint = '(optional)'
end
object DtSince: TDateTimePicker
Left = 111
Top = 63
Width = 137
Height = 21
Date = 44911.000000000000000000
Time = 0.858430219908768800
TabOrder = 14
end
object EdtSince: TEdit
Left = 111
Top = 36
Width = 137
Height = 21
TabOrder = 15
TextHint = 'Message id or Unix time'
end
object TableNotification: TFDMemTable
FetchOptions.AssignedValues = [evMode]
FetchOptions.Mode = fmAll
Expand All @@ -284,16 +301,33 @@ object ViewMain: TViewMain
Left = 568
Top = 336
object TableNotificationID: TStringField
DisplayLabel = 'Id'
FieldName = 'ID'
Size = 30
end
object TableNotificationTIME: TStringField
DisplayLabel = 'Time'
FieldName = 'TIME'
end
object TableNotificationPRIORITY: TStringField
DisplayLabel = 'Priority'
FieldName = 'PRIORITY'
Size = 10
end
object TableNotificationTITLE: TStringField
DisplayLabel = 'Title'
FieldName = 'TITLE'
Size = 50
end
object TableNotificationMSG: TStringField
DisplayLabel = 'Message'
FieldName = 'MSG'
Size = 60
Size = 500
end
object TableNotificationTOPIC: TStringField
DisplayLabel = 'Topic'
FieldName = 'TOPIC'
Size = 100
end
end
object DsTable: TDataSource
Expand Down
Loading

0 comments on commit b39b8f8

Please sign in to comment.