-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added ui updates to delete, close and ID-textfield
- Loading branch information
Ingmar Vogel
committed
Jun 18, 2024
1 parent
49bdffb
commit b2f15b2
Showing
16 changed files
with
72 additions
and
67 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
...ages/Liquid-Network.package/LQLocalObjectRepo.class/instance/at.ifPresent.ifAbsentPut..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
accessing | ||
at: key ifPresent: do ifAbsentPut: anObject | ||
|
||
self items at: key ifPresent: [:arg | do value] ifAbsentPut: (STON fromString: (STON toString: anObject)) | ||
self items at: key ifPresent: [:arg | do value] ifAbsentPut: (STON fromString: (STON toString: anObject)). | ||
self changed: #pollList |
3 changes: 2 additions & 1 deletion
3
packages/Liquid-Network.package/LQLocalObjectRepo.class/instance/removeKey..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
initialize-release | ||
removeKey: key | ||
|
||
self items removeKey: key ifAbsent: [self error] | ||
self items removeKey: key ifAbsent: [self error]. | ||
self changed: #pollList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
packages/Liquid-UI.package/LQHostMenuNew.class/instance/copyPollId.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
modifying | ||
copyPollId | ||
|
||
currentPoll == 0 ifFalse:[ | ||
Clipboard clipboardText: (self currentPollID asText). | ||
"Interacting with clipboard takes a bit of time otherwise we get faulty results when quickly accessing the Clipboard afterwards" | ||
(Delay forSeconds: self clipboardDelay) wait] | ||
currentPoll == 0 | ||
ifFalse: [Clipboard clipboardText: self currentPollID asText. | ||
"Interacting with clipboard takes a bit of time | ||
otherwise we get faulty results when quickly | ||
accessing the Clipboard afterwards" | ||
(Delay forSeconds: self clipboardDelay) wait] | ||
|
8 changes: 5 additions & 3 deletions
8
packages/Liquid-UI.package/LQHostMenuNew.class/instance/createPoll.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
modifying | ||
createPoll | ||
|
||
| givenPollTitle | | ||
givenPollTitle := UIManager default request: 'Enter a title for your poll'. | ||
(givenPollTitle = '') ifTrue: [^ self]. | ||
ToolBuilder open: (LQPollDraftBuilder newWithTitle: givenPollTitle) | ||
givenPollTitle = '' | ||
ifTrue: [^ self]. | ||
ToolBuilder | ||
open: (LQPollDraftBuilder newWithTitle: givenPollTitle) | ||
|
6 changes: 4 additions & 2 deletions
6
packages/Liquid-UI.package/LQHostMenuNew.class/instance/currentPollID.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
accessing | ||
currentPollID | ||
self pollList size == 0 ifFalse: [ | ||
^ (self pollList at: self getIndex) id] | ||
self pollList size == 0 | ||
ifFalse: [^ (self pollList at: self getIndex) id]. | ||
|
||
^ 'No polls in your repo.' |
15 changes: 7 additions & 8 deletions
15
packages/Liquid-UI.package/LQHostMenuNew.class/instance/deletePoll.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
modifying | ||
deletePoll | ||
|
||
self currentPoll == 0 ifFalse: [ | ||
(LQRemotePollRepoServer pollRepo at: self currentPollID | ||
ifAbsent: | ||
[^ 'Already deleted.']). | ||
LQRemotePollRepoServer pollRepo removeKey: self currentPollID | ||
] | ||
|
||
self currentPoll == 0 | ||
ifFalse: [LQRemotePollRepoServer pollRepo | ||
at: self currentPollID | ||
ifAbsent: [^ 'This poll does not exist.']. | ||
LQRemotePollRepoServer pollRepo removeKey: self currentPollID. | ||
self setIndex: self pollList size. | ||
self changed: #pollList] |
12 changes: 5 additions & 7 deletions
12
packages/Liquid-UI.package/LQHostMenuNew.class/instance/exportResults.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
modifying | ||
exportResults | ||
|
||
self currentPoll == 0 ifFalse: [ | ||
(LQRemotePollRepoServer pollRepo at: self currentPollID | ||
ifAbsent: | ||
[^ 'This poll does not exist.']) | ||
exportCSV | ||
] | ||
self currentPoll == 0 | ||
ifFalse: [LQRemotePollRepoServer pollRepo | ||
at: self currentPollID | ||
ifAbsent: [^ 'This poll does not exist.']. | ||
(LQRemotePollRepoServer pollRepo at: self currentPollID) exportCSV] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
packages/Liquid-UI.package/LQHostMenuNew.class/instance/pollList.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
accessing | ||
pollList | ||
^ pollList | ||
" LQRemotePollRepoServer pollRepo items size == 0 | ||
ifTrue: [^OrderedCollection new]." | ||
^ LQRemotePollRepoServer pollRepo items values asOrderedCollection |
10 changes: 5 additions & 5 deletions
10
packages/Liquid-UI.package/LQHostMenuNew.class/instance/setIndex..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
modifying | ||
setIndex: index | ||
|
||
setIndex: index | ||
self currentPoll: index. | ||
index=0 ifFalse: [self changed: #pollID]. | ||
self changed: #getIndex | ||
|
||
"index = 0 | ||
ifFalse: [self changed: #pollID]." | ||
self changed: #pollId. | ||
self changed: #getIndex |
17 changes: 9 additions & 8 deletions
17
packages/Liquid-UI.package/LQHostMenuNew.class/instance/visualizeResults.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
modifying | ||
visualizeResults | ||
|
||
| pollNameInput foundPoll | | ||
currentPoll == 0 ifFalse:[ | ||
pollNameInput := UIManager default request: 'Enter Poll ID'. | ||
pollNameInput ifEmpty: [^ self]. | ||
foundPoll := LQRemotePollRepoServer pollRepo at: pollNameInput | ||
ifAbsent: [^ UIManager default inform: 'This poll does not exist.']. | ||
LQVisualizationControls openOn: foundPoll] | ||
"| pollNameInput foundPoll | | ||
currentPoll == 0 | ||
ifFalse: [pollNameInput := UIManager default request: 'Enter Poll ID'. | ||
pollNameInput | ||
ifEmpty: [^ self]. | ||
foundPoll := LQRemotePollRepoServer pollRepo | ||
at: pollNameInput | ||
ifAbsent: [^ UIManager default inform: 'This poll does not exist.']. | ||
LQVisualizationControls openOn: foundPoll]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters